home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / gopher / Unix / gopher2.0-patches / patch10.Z / patch10
Encoding:
Text File  |  1993-11-04  |  140.5 KB  |  5,565 lines

  1. diff -c gopher+/Makefile.config.dist:3.7 gopher+/Makefile.config.dist:3.8
  2. *** gopher+/Makefile.config.dist:3.7    Fri Nov  5 01:49:46 1993
  3. --- gopher+/Makefile.config.dist    Fri Nov  5 01:49:46 1993
  4. ***************
  5. *** 5,12 ****
  6.   
  7.   #********************************************************************
  8.   # lindner
  9. ! # 3.7
  10. ! # 1993/09/22 04:32:32
  11.   # /export/mudhoney/GopherSrc/CVS/gopher+/Makefile.config.dist,v
  12.   # Exp
  13.   #
  14. --- 5,12 ----
  15.   
  16.   #********************************************************************
  17.   # lindner
  18. ! # 3.8
  19. ! # 1993/11/03 15:02:26
  20.   # /export/mudhoney/GopherSrc/CVS/gopher+/Makefile.config.dist,v
  21.   # Exp
  22.   #
  23. ***************
  24. *** 20,25 ****
  25. --- 20,28 ----
  26.   #*********************************************************************
  27.   # Revision History:
  28.   # Makefile.config.dist,v
  29. + # Revision 3.8  1993/11/03  15:02:26  lindner
  30. + # pl10
  31. + #
  32.   # Revision 3.7  1993/09/22  04:32:32  lindner
  33.   # Doc fixes
  34.   #
  35. ***************
  36. *** 95,101 ****
  37.   #
  38.   # Add -DUSG        for System V
  39.   #     -DBSD        for BSD
  40. ! #     -DPOSIXWAIT  if you have waitpid() instead of wait3()
  41.   
  42.   GSYSTYPE=
  43.   
  44. --- 98,104 ----
  45.   #
  46.   # Add -DUSG        for System V
  47.   #     -DBSD        for BSD
  48. ! #     -DNO_WAITPID if you have wait3 instead of waitpid()
  49.   
  50.   GSYSTYPE=
  51.   
  52. ***************
  53. *** 201,208 ****
  54.   #                  "       "  UMAXLIBS if compiling under UMAX,
  55.   #                  "       "  SCOLIBS  if compiling under SCO Unix.
  56.   #                  "       "  AUXLIBS  if compiling under A/UX
  57.   #
  58. - #
  59.   # Note: SCOLIBS needs -lintl if using gcc to compile in order to find strftime
  60.   #
  61.   #UMAXLIBS    = -lresolv
  62. --- 204,211 ----
  63.   #                  "       "  UMAXLIBS if compiling under UMAX,
  64.   #                  "       "  SCOLIBS  if compiling under SCO Unix.
  65.   #                  "       "  AUXLIBS  if compiling under A/UX
  66. + #                  "       "  INTERACTIVELIBS if compiling under Interactive
  67.   #
  68.   # Note: SCOLIBS needs -lintl if using gcc to compile in order to find strftime
  69.   #
  70.   #UMAXLIBS    = -lresolv
  71. ***************
  72. *** 212,217 ****
  73. --- 215,221 ----
  74.   #SCOLIBS        = -lsocket -lintl
  75.   #SVR4LIBS    = -lsocket -lnsl
  76.   #AUXLIBS    = -lmalloc
  77. + #INTERACTIVELIBS= -linet
  78.   
  79.   OTHERLIBS    =  $(HPLIBS) $(UMAXLIBS) $(SEQLIBS) $(PTXLIBS) $(SCOLIBS) \
  80.              $(SVR4LIBS) $(AUXLIBS)
  81. diff -c gopher+/README:3.2 gopher+/README:3.3
  82. *** gopher+/README:3.2    Fri Nov  5 01:49:47 1993
  83. --- gopher+/README    Fri Nov  5 01:49:47 1993
  84. ***************
  85. *** 1,6 ****
  86. ! README,v 3.2 1993/10/20 03:35:03 lindner Exp
  87.   
  88. ! This is the University of Minnesota's Internet Gopher distribution for
  89.   UNIX machines.  Here's a breakdown by directory:
  90.   
  91.   doc:          The documentation for all parts of the distribution.
  92. --- 1,6 ----
  93. ! README,v 3.3 1993/11/04 02:12:58 lindner Exp
  94.   
  95. ! This is the University of Minnesota's Internet Gopher+ distribution for
  96.   UNIX machines.  Here's a breakdown by directory:
  97.   
  98.   doc:          The documentation for all parts of the distribution.
  99. ***************
  100. *** 13,18 ****
  101. --- 13,22 ----
  102.   
  103.   gopherd:      The Internet Gopher+ data/directory/index/sound Server.
  104.   
  105. + gophfilt:     A Gopher "filter" program.
  106. + test:         A regression testing package, include sample data.
  107.   Please look in the directory "doc" for more information about installing
  108.   the various portions of the Internet Gopher.  Specifically refer to
  109.   the file INSTALL.
  110. ***************
  111. *** 32,37 ****
  112. --- 36,42 ----
  113.                                 (For UI cloning)
  114.   
  115.      WAIS                          Brewster and co. at Thinking Machines
  116. +                               (er, now WAIS Inc.)
  117.                                 (For our UNIX generic indexing stuff)
  118.   
  119.   and all of our users for their great suggestions and patches!
  120. diff -c gopher+/conf.h:3.12 gopher+/conf.h:3.13
  121. *** gopher+/conf.h:3.12    Fri Nov  5 01:49:47 1993
  122. --- gopher+/conf.h    Fri Nov  5 01:49:47 1993
  123. ***************
  124. *** 1,7 ****
  125.   /********************************************************************
  126.    * lindner
  127. !  * 3.12
  128. !  * 1993/10/13 16:46:51
  129.    * /export/mudhoney/GopherSrc/CVS/gopher+/conf.h,v
  130.    * Exp
  131.    *
  132. --- 1,7 ----
  133.   /********************************************************************
  134.    * lindner
  135. !  * 3.13
  136. !  * 1993/11/03 03:36:35
  137.    * /export/mudhoney/GopherSrc/CVS/gopher+/conf.h,v
  138.    * Exp
  139.    *
  140. ***************
  141. *** 15,20 ****
  142. --- 15,23 ----
  143.    *********************************************************************
  144.    * Revision History:
  145.    * conf.h,v
  146. +  * Revision 3.13  1993/11/03  03:36:35  lindner
  147. +  * Mod for variable records
  148. +  *
  149.    * Revision 3.12  1993/10/13  16:46:51  lindner
  150.    * Updates for %s on defaults, vms mods
  151.    *
  152. ***************
  153. *** 110,115 ****
  154. --- 113,129 ----
  155.   
  156.   
  157.   #if defined(VMS)
  158. + /*
  159. +  * VMS systems use VARIABLE length records for text files and
  160. +  * FIXED 512 records for binary files that are saved or cached.
  161. +  * Comment this out if you want to use stream_LF format instead.
  162. +  * The Bookmark (sys$login:gopherrc.) and configuration
  163. +  * (GopherP_Dir:gopher.rc and GopherP_Dir:gopherremote.rc, see
  164. +  * below) files are stream_LF regardless of how this program
  165. +  * logical is set.
  166. +  */
  167. + #define VMSRecords /* */
  168.   /*
  169.    * The "builtin" pager is the default VMS utility for displaying text.
  170.    * Alternatively, define "TPU" for invoking callable TPU.  Its /READ_ONLY
  171. diff -c gopher+/patchlevel.h:3.10 gopher+/patchlevel.h:3.11
  172. *** gopher+/patchlevel.h:3.10    Fri Nov  5 01:49:48 1993
  173. --- gopher+/patchlevel.h    Fri Nov  5 01:49:48 1993
  174. ***************
  175. *** 5,8 ****
  176.   #define GOPHER_MAJOR_VERSION "2"
  177.   #define GOPHER_MINOR_VERSION "0"
  178.   
  179. ! #define PATCHLEVEL 9
  180. --- 5,8 ----
  181.   #define GOPHER_MAJOR_VERSION "2"
  182.   #define GOPHER_MINOR_VERSION "0"
  183.   
  184. ! #define PATCHLEVEL 10
  185. diff -c gopher+/doc/client.changes:3.15 gopher+/doc/client.changes:3.16
  186. *** gopher+/doc/client.changes:3.15    Fri Nov  5 01:49:49 1993
  187. --- gopher+/doc/client.changes    Fri Nov  5 01:49:49 1993
  188. ***************
  189. *** 1,4 ****
  190. ! client.changes,v 3.15 1993/10/20 04:03:10 lindner Exp
  191.   
  192.   Gopher+2.0 patchlevel 9
  193.   -----------------------
  194. --- 1,31 ----
  195. ! client.changes,v 3.16 1993/11/05 07:39:33 lindner Exp
  196. ! Gopher+2.0 patchlevel 10
  197. ! ------------------------
  198. !  
  199. !  * Fix for segmentation fault when saving or downloading
  200. !  
  201. !  * Fix for osf curses line drawing characters
  202. !  * Fix for people trying to download the help file
  203. !  * Move screen refresh stuff to CURwgetch()
  204. !  * Add optional client logging
  205. !  * Cleanup on a SIGHUP signal
  206. !  * Use $HOME instead of password routines to read .gopherrc
  207. !  * Allow saving to variable length record VMS files (see conf.h)
  208. !  * Add Movie (;) and Info (i) type support
  209. !  * Add q to exit out of pager for completeness
  210. !  * Now possible to print via builtin pager.
  211.   
  212.   Gopher+2.0 patchlevel 9
  213.   -----------------------
  214. diff -c gopher+/doc/server.changes:3.16 gopher+/doc/server.changes:3.17
  215. *** gopher+/doc/server.changes:3.16    Fri Nov  5 01:49:49 1993
  216. --- gopher+/doc/server.changes    Fri Nov  5 01:49:50 1993
  217. ***************
  218. *** 1,4 ****
  219. ! server.changes,v 3.16 1993/10/20 04:03:13 lindner Exp
  220.   
  221.   Gopher+2.0 patchlevel 9
  222.   -----------------------
  223. --- 1,24 ----
  224. ! server.changes,v 3.17 1993/11/05 07:39:35 lindner Exp
  225. ! Gopher+2.0 patchlevel 10
  226. ! ------------------------
  227. !  * Speedup gopher0 requests for WAIS searches.
  228. !  * Added HTML alternate views for gopher+ directories.
  229. !  * Plug many, many memory leaks.
  230. !  * Test shell scripts for exec bit, i.e. you can now have shell scripts
  231. !    on your server and not have them executed.
  232. !  * Allow Type=1? etc.. in .link files to make a link to an ASK item.
  233. !  * Added Domain_pat= line to check for a regexp domains
  234. !  * Allow multiple Domain= and Domain_pat= lines in .link files to be
  235. !    boolean or'ed
  236.   
  237.   Gopher+2.0 patchlevel 9
  238.   -----------------------
  239. diff -c gopher+/gopher/CURcurses.c:3.27 gopher+/gopher/CURcurses.c:3.31
  240. *** gopher+/gopher/CURcurses.c:3.27    Fri Nov  5 01:49:51 1993
  241. --- gopher+/gopher/CURcurses.c    Fri Nov  5 01:49:51 1993
  242. ***************
  243. *** 1,7 ****
  244.   /********************************************************************
  245.    * lindner
  246. !  * 3.27
  247. !  * 1993/10/07 05:10:12
  248.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/CURcurses.c,v
  249.    * Exp
  250.    *
  251. --- 1,7 ----
  252.   /********************************************************************
  253.    * lindner
  254. !  * 3.31
  255. !  * 1993/11/04 02:06:50
  256.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/CURcurses.c,v
  257.    * Exp
  258.    *
  259. ***************
  260. *** 15,20 ****
  261. --- 15,32 ----
  262.    *********************************************************************
  263.    * Revision History:
  264.    * CURcurses.c,v
  265. +  * Revision 3.31  1993/11/04  02:06:50  lindner
  266. +  * Add Ben's AIS hack
  267. +  *
  268. +  * Revision 3.30  1993/10/26  18:24:31  lindner
  269. +  * Make sure we cleanup before exiting
  270. +  *
  271. +  * Revision 3.29  1993/10/26  18:12:56  lindner
  272. +  * Fixes for Input routines, screen redrawing, ASK fixes
  273. +  *
  274. +  * Revision 3.28  1993/10/22  20:22:12  lindner
  275. +  * Range checks for lots of things
  276. +  *
  277.    * Revision 3.27  1993/10/07  05:10:12  lindner
  278.    * Make TrimmedTitle[] (twice) a larger array (256 elements).  Makes
  279.    * 132-column terminals and huge xterm windows happier.
  280. ***************
  281. *** 388,411 ****
  282.   /*
  283.    * Centerline, uses curses routines to center a line.
  284.    */
  285. ! void CURcenterline(cur, theline, yval)
  286.     CursesObj *cur;
  287.     char      *theline;
  288. !   int       yval;
  289.   {
  290.        char TrimmedLine[256];
  291.   
  292. !      /** Make sure theline fits on the screen **/
  293. !      if (strlen(theline) > COLS) {
  294. !           strncpy(TrimmedLine, theline, COLS);
  295. !           TrimmedLine[COLS-3] = '.';
  296. !       TrimmedLine[COLS-2] = '.';
  297. !       TrimmedLine[COLS-1] = '.';
  298. !       TrimmedLine[COLS] = '\0';
  299. !       mvaddstr(yval, 0, TrimmedLine);
  300.        }
  301. !      else
  302. !           mvaddstr(yval, (COLS - strlen(theline))/2, theline);
  303.   }
  304.   
  305.   
  306. --- 400,433 ----
  307.   /*
  308.    * Centerline, uses curses routines to center a line.
  309.    */
  310. ! void CURcenterline(cur, win, theline, yval, windowidth, bright)
  311.     CursesObj *cur;
  312. +   WINDOW    *win;
  313.     char      *theline;
  314. !   int       yval, windowidth;
  315. !   boolean   bright;
  316.   {
  317.        char TrimmedLine[256];
  318.   
  319. !      strcpy(TrimmedLine, theline);
  320. !      /** Make sure theline fits in the window **/
  321. !      if (strlen(theline) > windowidth) {
  322. !       TrimmedLine[windowidth-3] = '.';
  323. !       TrimmedLine[windowidth-2] = '.';
  324. !       TrimmedLine[windowidth-1] = '.';
  325. !       TrimmedLine[windowidth] = '\0';
  326.        }
  327. !      wmove(win, yval, (windowidth - strlen(TrimmedLine))/2);
  328. !      if (bright)
  329. !       wstandout(win);
  330. !      waddstr(win, TrimmedLine);
  331. !      if (bright)
  332. !       wstandend(win);
  333.   }
  334.   
  335.   
  336. ***************
  337. *** 573,644 ****
  338.   {
  339.        int a, b, c;
  340.        
  341. !      c = wgetch(window);
  342. !      
  343. !      /** Nasty, but get's the job done..
  344. !          an error on input usually means that the connection was closed.. 
  345. !       **/
  346.   
  347. !      if (c == -1)
  348. !       exit(-1);
  349.   
  350. !      if (c == 27) {      /* handle escape sequence */
  351. !       b = wgetch(window);
  352. !       if (b == '[' || b == 'O')
  353. !            a = wgetch(window);
  354. !       else
  355. !            a = b;
  356. !       
  357. !       switch (a) {
  358. !       case 'A': c = KEY_UP; break;
  359. !       case 'B': c = KEY_DOWN; break;
  360. !       case 'C': c = KEY_RIGHT; break;
  361. !       case 'D': c = KEY_LEFT; break;
  362.   
  363. !       case 'M':                   /* vt100 enter */
  364. !             if (b == 'O')
  365. !              c = KEY_ENTER;
  366.              break;
  367.   
  368. !       case 'Q':                   /* vt100 Help */
  369. !             if (b == 'O')
  370. !              c = KEY_HELP;
  371. !             break;
  372.   
  373. !       case '2':
  374. !            if (b == '[')
  375. !              b = wgetch(window);
  376. !            switch(b) {
  377. !            case '8':             /* vt200 Help */
  378. !             if (wgetch(window) == '~')
  379. !              c = KEY_HELP;
  380.               break;
  381. !            case '9':             /* vt200 Do */
  382. !             if (wgetch(window) == '~')
  383. !              c = KEY_ENTER;
  384.               break;
  385. !            }
  386.              
  387. !       case '5':                       /* vt 200 prev. screen */
  388. !            if (b == '[' && wgetch(window) == '~')
  389. !             c = KEY_PPAGE;
  390. !            break;
  391. !       case '6':                       /* vt 200 next screen */
  392. !            if (b == '[' && wgetch(window) == '~')
  393. !             c = KEY_NPAGE;
  394. !            break;
  395. !       }
  396. !      }
  397. !      
  398. !      /* The many forms of the return key... */
  399. !      if ((c == KEY_ENTER)|| (c=='\r')) 
  400. !       c = '\n'; /** SYSV curses Gack! **/
  401. !      
  402. !      /* The many forms of backspace */
  403. !      if (c == '\010' || c == '\177' || c == KEY_BACKSPACE)
  404. !       return('\b');
  405.   
  406. !      return(c);
  407.   }
  408.   
  409.   int
  410. --- 595,685 ----
  411.   {
  412.        int a, b, c;
  413.        
  414. !      while (1) {
  415.   
  416. !       c = wgetch(window);
  417.   
  418. !       switch (c) {
  419.   
  420. !       case -1:  /* error usually means connection was closed.. */
  421. !            CleanupandExit(-1);
  422.              break;
  423.   
  424. !       case 12:  /* ^L */
  425. !       case 18:  /* ^R */
  426. !       case 23:  /* ^W */
  427. !            /* redraw the screen */
  428. ! #ifdef VMS
  429. !            clearok(curscr, TRUE);
  430. !            wrefresh(window);
  431. ! #else
  432. !            wrefresh(curscr);
  433. ! #endif
  434. !            /* don't return yet, get another keystroke */
  435. !            break;
  436.   
  437. !       case 27:  /* handle escape sequence */
  438. !            b = wgetch(window);
  439. !            if (b == '[' || b == 'O')
  440. !             a = wgetch(window);
  441. !            else
  442. !             a = b;
  443. !            switch (a) {
  444. !            case 'A': c = KEY_UP; break;
  445. !            case 'B': c = KEY_DOWN; break;
  446. !            case 'C': c = KEY_RIGHT; break;
  447. !            case 'D': c = KEY_LEFT; break;
  448. !            case 'M':                   /* vt100 enter */
  449. !             if (b == 'O')
  450. !             c = KEY_ENTER;
  451.               break;
  452. !            case 'Q':                   /* vt100 Help */
  453. !             if (b == 'O')
  454. !             c = KEY_HELP;
  455.               break;
  456. !            case '2':
  457. !             if (b == '[')
  458. !             b = wgetch(window);
  459. !             switch(b) {
  460. !             case '8':             /* vt200 Help */
  461. !             if (wgetch(window) == '~')
  462. !                 c = KEY_HELP;
  463. !             break;
  464. !             case '9':             /* vt200 Do */
  465. !             if (wgetch(window) == '~')
  466. !                 c = KEY_ENTER;
  467. !             break;
  468. !             }
  469.              
  470. !            case '5':                       /* vt 200 prev. screen */
  471. !             if (b == '[' && wgetch(window) == '~')
  472. !             c = KEY_PPAGE;
  473. !             break;
  474. !            case '6':                       /* vt 200 next screen */
  475. !             if (b == '[' && wgetch(window) == '~')
  476. !             c = KEY_NPAGE;
  477. !             break;
  478. !            }
  479. !            /* fall through to default to reassign certain keys */
  480.   
  481. !       default:
  482. !       /* The many forms of the return key... */
  483. !       if ((c == KEY_ENTER)|| (c=='\r')) 
  484. !            c = '\n'; /** SYSV curses Gack! **/
  485. !       /* The many forms of backspace */
  486. !       if (c == '\010' || c == '\177' || c == KEY_BACKSPACE)
  487. !            return('\b');
  488. !       return(c);
  489. !       break;
  490. !       }  /* switch(c) */
  491. !      }  /* while(1) */
  492.   }
  493.   
  494.   int
  495. ***************
  496. *** 797,805 ****
  497.   #ifdef SYSVCURSES
  498.        beep();
  499.   #else
  500. !      CURcenterline(cur,CURgetBell(cur),1);
  501. !      /* tputs(CURgetBell(cur),1,CURoutchar); */
  502. !      /* fflush(stdout); */
  503.   #endif
  504.   }
  505.   
  506. --- 838,846 ----
  507.   #ifdef SYSVCURSES
  508.        beep();
  509.   #else
  510. ! /*   CURcenterline(cur, stdscr, CURgetBell(cur), 1, COLS, FALSE); */
  511. !      tputs(CURgetBell(cur), 1, CURoutchar);
  512. !      fflush(stdout);
  513.   #endif
  514.   }
  515.   
  516. ***************
  517. *** 874,887 ****
  518.         messheight++;
  519.        }
  520.   
  521. !      if (messlength > COLS)
  522. !       messlength = COLS -4;
  523. !      if (strlen(Wintitle) > messlength)
  524. !       winwidth = strlen(Wintitle) + 2;
  525. !      winwidth = messlength + 6;
  526.   
  527. !      if (winwidth < 30)
  528. !       winwidth = 30;
  529.        
  530.        tempwin = newwin(6+messheight, winwidth, (LINES-(6+messheight))/2,
  531.                    (COLS-winwidth) /2);
  532. --- 915,927 ----
  533.         messheight++;
  534.        }
  535.   
  536. !      if ((i=strlen(Wintitle)) > messlength)
  537. !       winwidth = i + 4;
  538. !      else
  539. !       winwidth = messlength + 6;
  540.   
  541. !      if (winwidth > (i = COLS-2))
  542. !       winwidth = i;
  543.        
  544.        tempwin = newwin(6+messheight, winwidth, (LINES-(6+messheight))/2,
  545.                    (COLS-winwidth) /2);
  546. ***************
  547. *** 905,920 ****
  548.   
  549.   
  550.   
  551. !      /** Add the window title **/
  552. !      if (Wintitle != NULL) {
  553. !       wmove(tempwin, 0,(winwidth - strlen(Wintitle))/2);
  554. !       wstandout(tempwin);
  555. !       waddstr(tempwin, Wintitle);
  556. !       wstandend(tempwin);
  557. !      }
  558.   
  559.        /** Add the keyboard labels **/
  560. !      wmove(tempwin, 3+messheight, winwidth - 29);
  561.        CURbutton(cur, tempwin, "Cancel: ^G", FALSE);
  562.        waddch(tempwin, ' ');
  563.        CURbutton(cur, tempwin, "OK: Enter", FALSE);
  564. --- 945,956 ----
  565.   
  566.   
  567.   
  568. !      /** Add the window title, centered **/
  569. !      if (Wintitle != NULL)
  570. !       CURcenterline(cur, tempwin, Wintitle, 0, winwidth, TRUE);
  571.   
  572.        /** Add the keyboard labels **/
  573. !      wmove(tempwin, 3+messheight, winwidth - 28);
  574.        CURbutton(cur, tempwin, "Cancel: ^G", FALSE);
  575.        waddch(tempwin, ' ');
  576.        CURbutton(cur, tempwin, "OK: Enter", FALSE);
  577. ***************
  578. *** 981,987 ****
  579.        int maxpromptwidth =0;
  580.        int currentfield = 0;
  581.        int maxlength = COLS-7;
  582. -      char TrimmedTitle[256];
  583.        Requestitem *curitem;
  584.        int ch;
  585.   
  586. --- 1017,1022 ----
  587. ***************
  588. *** 1004,1009 ****
  589. --- 1039,1049 ----
  590.         return(-1);
  591.        }
  592.        
  593. +      if (numprompts > (LINES-6)) {
  594. +       CursesErrorMsg("Sorry, this form cannot fit on the screen");
  595. +       return(-1);
  596. +      }
  597.        /** If only one prompt, offer entire window for reply **/
  598.        if (numprompts == 1 && items[0]->thing == CUR_PROMPT) {
  599.             tempwin = newwin(8, COLS-2, (LINES-4)/2,1);
  600. ***************
  601. *** 1018,1041 ****
  602.        }
  603.        
  604.        /*** Add the window title, centered ***/
  605. !      if (Wintitle != NULL) {
  606. !           /** Trim window title to fit in the window **/
  607. !           if (strlen(Wintitle) > COLS-2) {
  608. !                strncpy(TrimmedTitle, Wintitle, COLS-2);
  609. !                TrimmedTitle[COLS-5] = '.';
  610. !                TrimmedTitle[COLS-4] = '.';
  611. !                TrimmedTitle[COLS-3] = '.';
  612. !                TrimmedTitle[COLS-2] = '\0';
  613. !           }
  614. !           else
  615. !            strcpy(TrimmedTitle, Wintitle);
  616. !       /** Put the title, bold **/
  617. !       wmove(tempwin, 0,(COLS -2  - strlen(TrimmedTitle))/2);
  618. !       wstandout(tempwin);
  619. !       waddstr(tempwin, TrimmedTitle);
  620. !       wstandend(tempwin);
  621. !      }
  622.        
  623.        /** Add the prompts and typing area **/
  624.        if (numprompts == 1 && items[0]->thing == CUR_PROMPT) {
  625. --- 1058,1065 ----
  626.        }
  627.        
  628.        /*** Add the window title, centered ***/
  629. !      if (Wintitle != NULL)
  630. !       CURcenterline(cur, tempwin, Wintitle, 0, COLS-2, TRUE);
  631.        
  632.        /** Add the prompts and typing area **/
  633.        if (numprompts == 1 && items[0]->thing == CUR_PROMPT) {
  634. ***************
  635. *** 1050,1056 ****
  636.         wmove(tempwin, 4, 3);
  637.         wstandout(tempwin);
  638.         waddstr(tempwin, items[0]->stowage);
  639. !       for (j=strlen(items[0]->stowage)+3; j< COLS-6; j++) {
  640.              waddch(tempwin, ' ');
  641.         }
  642.         wstandend(tempwin);
  643. --- 1074,1080 ----
  644.         wmove(tempwin, 4, 3);
  645.         wstandout(tempwin);
  646.         waddstr(tempwin, items[0]->stowage);
  647. !       for (j=strlen(items[0]->stowage)+3; j< COLS-4; j++) {
  648.              waddch(tempwin, ' ');
  649.         }
  650.         wstandend(tempwin);
  651. ***************
  652. *** 1087,1093 ****
  653.                    waddstr(tempwin, items[i]->stowage);
  654.   
  655.                   for (j=strlen(items[i]->stowage)+maxpromptwidth+4; 
  656. !              j< COLS-6; j++) {
  657.                    waddch(tempwin, ' ');
  658.                   }
  659.                   wstandend(tempwin);
  660. --- 1111,1117 ----
  661.                    waddstr(tempwin, items[i]->stowage);
  662.   
  663.                   for (j=strlen(items[i]->stowage)+maxpromptwidth+4; 
  664. !              j< COLS-4; j++) {
  665.                    waddch(tempwin, ' ');
  666.                   }
  667.                   wstandend(tempwin);
  668. ***************
  669. *** 1097,1104 ****
  670. --- 1121,1133 ----
  671.   
  672.        /** Add the labels, centered **/
  673.        if (numprompts > 1 || items[0]->thing != CUR_PROMPT) {
  674. + #ifndef AIS_HACK
  675.         wmove(tempwin, 3+numprompts, (COLS-63)/2);
  676.         CURbutton(cur, tempwin, "Switch Fields: TAB", FALSE);
  677. + #else
  678. +       wmove(tempwin, 3+numprompts, (COLS-70)/2);
  679. +       CURbutton(cur, tempwin, "Switch Fields: TAB or PA1", FALSE);
  680. + #endif
  681.             waddch(tempwin, ' ');
  682.        }
  683.        else
  684. ***************
  685. *** 1156,1161 ****
  686. --- 1185,1191 ----
  687.                          items[currentfield]->choices,
  688.                          "Select an item",
  689.                          items[currentfield]->chooseitem);
  690. +              touchwin(tempwin);
  691.                if (tempx != -1)
  692.                     choice = tempx;
  693.               }
  694. ***************
  695. *** 1188,1195 ****
  696.              /*** Move to another field ***/
  697.              do {
  698.               currentfield = (currentfield +1) % numprompts;
  699. !            } while (items[currentfield]->stowage == NULL || 
  700. !             items[currentfield]->thing == CUR_LABEL);
  701.              break;
  702.   
  703.         case KEY_UP:
  704. --- 1218,1224 ----
  705.              /*** Move to another field ***/
  706.              do {
  707.               currentfield = (currentfield +1) % numprompts;
  708. !            } while (items[currentfield]->thing == CUR_LABEL);
  709.              break;
  710.   
  711.         case KEY_UP:
  712. ***************
  713. *** 1197,1204 ****
  714.               currentfield--;
  715.               if (currentfield <0)
  716.                currentfield = numprompts-1;
  717. !            } while (items[currentfield]->stowage == NULL ||
  718. !             items[currentfield]->thing   == CUR_LABEL);
  719.              
  720.              break;
  721.              
  722. --- 1226,1232 ----
  723.               currentfield--;
  724.               if (currentfield <0)
  725.                currentfield = numprompts-1;
  726. !            } while (items[currentfield]->thing   == CUR_LABEL);
  727.              
  728.              break;
  729.              
  730. ***************
  731. *** 1235,1241 ****
  732.     char *prompt;
  733.     int default_choice;
  734.   {
  735. !      int numchoices=0, i, maxchoicewidth=0;
  736.        WINDOW *tempwin;
  737.        
  738.        while (choices[numchoices++] != NULL)
  739. --- 1263,1269 ----
  740.     char *prompt;
  741.     int default_choice;
  742.   {
  743. !      int numchoices=0, maxchoicewidth=24, winwidth, i;
  744.        WINDOW *tempwin;
  745.        
  746.        while (choices[numchoices++] != NULL)
  747. ***************
  748. *** 1248,1271 ****
  749.         return(-1);
  750.   
  751.        if ((i=strlen(prompt)) > maxchoicewidth)
  752. !       maxchoicewidth = i;
  753.   
  754. !      if ((i=strlen(Wintitle)) > maxchoicewidth)
  755. !       maxchoicewidth = i;
  756.   
  757.   
  758. !      tempwin = newwin(8+numchoices, maxchoicewidth + 10, 
  759. !               (LINES-(6+numchoices))/2, (COLS-(maxchoicewidth+10))/2);
  760.   
  761. !      CURbox(cur, tempwin, 8+numchoices, 10 + maxchoicewidth);
  762.   
  763. !      /*** Add the window title ***/
  764. !      if (Wintitle != NULL) {
  765. !       wmove(tempwin, 0,(maxchoicewidth+10 -2  - strlen(Wintitle))/2);
  766. !       wstandout(tempwin);
  767. !       waddstr(tempwin, Wintitle);
  768. !       wstandend(tempwin);
  769. !      }
  770.   
  771.        /*** Add the choices to the screen ***/
  772.   
  773. --- 1276,1299 ----
  774.         return(-1);
  775.   
  776.        if ((i=strlen(prompt)) > maxchoicewidth)
  777. !       winwidth = i + 10;
  778. !      else
  779. !       winwidth = maxchoicewidth + 10;
  780.   
  781. !      if ((i=strlen(Wintitle)+8) > winwidth)
  782. !       winwidth = i;
  783.   
  784. +      if (winwidth > (i = COLS-2))
  785. +       winwidth = i;
  786.   
  787. !      tempwin = newwin(8+numchoices, winwidth,
  788. !           (LINES-(8+numchoices))/2, (COLS-winwidth)/2);
  789.   
  790. !      CURbox(cur, tempwin, 8+numchoices, winwidth);
  791.   
  792. !      /*** Add the window title, centered ***/
  793. !      if (Wintitle != NULL)
  794. !       CURcenterline(cur, tempwin, Wintitle, 0, winwidth, TRUE);
  795.   
  796.        /*** Add the choices to the screen ***/
  797.   
  798. diff -c gopher+/gopher/CURcurses.h:3.8 gopher+/gopher/CURcurses.h:3.9
  799. *** gopher+/gopher/CURcurses.h:3.8    Fri Nov  5 01:49:52 1993
  800. --- gopher+/gopher/CURcurses.h    Fri Nov  5 01:49:52 1993
  801. ***************
  802. *** 1,7 ****
  803.   /********************************************************************
  804.    * lindner
  805. !  * 3.8
  806. !  * 1993/09/26 09:19:21
  807.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/CURcurses.h,v
  808.    * Exp
  809.    *
  810. --- 1,7 ----
  811.   /********************************************************************
  812.    * lindner
  813. !  * 3.9
  814. !  * 1993/11/02 06:21:30
  815.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/CURcurses.h,v
  816.    * Exp
  817.    *
  818. ***************
  819. *** 15,20 ****
  820. --- 15,23 ----
  821.    *********************************************************************
  822.    * Revision History:
  823.    * CURcurses.h,v
  824. +  * Revision 3.9  1993/11/02  06:21:30  lindner
  825. +  * Fix for osf curses
  826. +  *
  827.    * Revision 3.8  1993/09/26  09:19:21  lindner
  828.    * Add bold #defines
  829.    *
  830. ***************
  831. *** 107,113 ****
  832.    * Definitions for character graphics
  833.    */
  834.   
  835. ! #if defined(SYSVCURSES) && !defined(ultrix) && !defined(hpux) && !defined(_AUX_SOURCE)
  836.   # define BOX_UL          ('l'|A_ALTCHARSET)
  837.   # define BOX_UR          'k'|A_ALTCHARSET
  838.   # define BOX_LL          'm'|A_ALTCHARSET
  839. --- 110,116 ----
  840.    * Definitions for character graphics
  841.    */
  842.   
  843. ! #if defined(SYSVCURSES) && !defined(ultrix) && !defined(hpux) && !defined(_AUX_SOURCE) && !defined(__osf__)
  844.   # define BOX_UL          ('l'|A_ALTCHARSET)
  845.   # define BOX_UR          'k'|A_ALTCHARSET
  846.   # define BOX_LL          'm'|A_ALTCHARSET
  847. diff -c gopher+/gopher/cso.c:3.6 gopher+/gopher/cso.c:3.7
  848. *** gopher+/gopher/cso.c:3.6    Fri Nov  5 01:49:53 1993
  849. --- gopher+/gopher/cso.c    Fri Nov  5 01:49:53 1993
  850. ***************
  851. *** 1,7 ****
  852.   /********************************************************************
  853.    * lindner
  854. !  * 3.6
  855. !  * 1993/10/11 04:44:09
  856.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/cso.c,v
  857.    * Exp
  858.    *
  859. --- 1,7 ----
  860.   /********************************************************************
  861.    * lindner
  862. !  * 3.7
  863. !  * 1993/10/22 20:21:02
  864.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/cso.c,v
  865.    * Exp
  866.    *
  867. ***************
  868. *** 15,20 ****
  869. --- 15,23 ----
  870.    *********************************************************************
  871.    * Revision History:
  872.    * cso.c,v
  873. +  * Revision 3.7  1993/10/22  20:21:02  lindner
  874. +  * misc fixes
  875. +  *
  876.    * Revision 3.6  1993/10/11  04:44:09  lindner
  877.    * Add early searching.. tag for CSO, better ui
  878.    *
  879. ***************
  880. *** 60,66 ****
  881.        int sockfd, len, numfields=0;
  882.        char *Fields[50];
  883.        char *Responses[50];
  884. !      char query[512], tmpquery[256];
  885.        int i;
  886.   
  887.        Draw_Status("Fetching Fields...");
  888. --- 63,69 ----
  889.        int sockfd, len, numfields=0;
  890.        char *Fields[50];
  891.        char *Responses[50];
  892. !      char query[512];
  893.        int i;
  894.   
  895.        Draw_Status("Fetching Fields...");
  896. ***************
  897. *** 138,153 ****
  898.         
  899.         for (i=0; i<numfields; i++) {
  900.              if (*Responses[i] != '\0') {
  901. !             cp = strrchr(Responses[i], ' ');
  902. !             while (cp != NULL) {
  903. !              sprintf(tmpquery, "%s=%s ", Fields[i], cp+1);
  904. !              strcat(query, tmpquery);
  905. !              *cp = '\0';
  906. !              cp = strrchr(Responses[i], ' ');
  907. !             }
  908. !             
  909. !             sprintf(tmpquery, "%s=%s ", Fields[i], Responses[i]);
  910. !             strcat(query, tmpquery);
  911.              }
  912.         }
  913.         if (strlen(query) > 6)
  914. --- 141,159 ----
  915.         
  916.         for (i=0; i<numfields; i++) {
  917.              if (*Responses[i] != '\0') {
  918. !             cp = Responses[i];
  919. !             do {
  920. !              len = strcspn(cp, " ");
  921. !              if (len != 0) {
  922. !                   strcat(query, Fields[i]);
  923. !                   strcat(query, "=");
  924. !                   strncat(query, cp, len);
  925. !                   strcat(query, " ");
  926. !              }
  927. !              cp = strchr(cp, ' ');
  928. !              if (cp != NULL)
  929. !                   cp++;
  930. !             } while (cp != NULL);
  931.              }
  932.         }
  933.         if (strlen(query) > 6)
  934. diff -c gopher+/gopher/download.c:3.12 gopher+/gopher/download.c:3.13
  935. *** gopher+/gopher/download.c:3.12    Fri Nov  5 01:49:53 1993
  936. --- gopher+/gopher/download.c    Fri Nov  5 01:49:53 1993
  937. ***************
  938. *** 1,7 ****
  939.   /********************************************************************
  940.    * lindner
  941. !  * 3.12
  942. !  * 1993/10/07 05:11:00
  943.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/download.c,v
  944.    * Exp
  945.    *
  946. --- 1,7 ----
  947.   /********************************************************************
  948.    * lindner
  949. !  * 3.13
  950. !  * 1993/10/26 18:44:12
  951.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/download.c,v
  952.    * Exp
  953.    *
  954. ***************
  955. *** 15,20 ****
  956. --- 15,23 ----
  957.    *********************************************************************
  958.    * Revision History:
  959.    * download.c,v
  960. +  * Revision 3.13  1993/10/26  18:44:12  lindner
  961. +  * Fix for people trying to download the help file
  962. +  *
  963.    * Revision 3.12  1993/10/07  05:11:00  lindner
  964.    * Fixed spawned process error checking on Unix, add third arg to Save_File
  965.    *
  966. ***************
  967. *** 152,161 ****
  968.        
  969.        /*** Get a reasonable tmp file name ***/
  970.        cp = GSgetPath(gs);
  971. !      if ((cp = strrchr(cp,'/')) != NULL)
  972. !       strcpy(tmpfilename, cp+1);
  973. !      else
  974.         strcpy(tmpfilename,GSgetTitle(gs));
  975.   
  976.   #ifdef VMS
  977.        VMSfile(tmpfilename);
  978. --- 155,169 ----
  979.        
  980.        /*** Get a reasonable tmp file name ***/
  981.        cp = GSgetPath(gs);
  982. !      if (cp != NULL) {
  983. !       if ((cp = strrchr(cp,'/')) != NULL)
  984. !            strcpy(tmpfilename, cp+1);
  985. !       else
  986. !            strcpy(tmpfilename,GSgetTitle(gs));
  987. !      } else {
  988.         strcpy(tmpfilename,GSgetTitle(gs));
  989. +      }      
  990. +       
  991.   
  992.   #ifdef VMS
  993.        VMSfile(tmpfilename);
  994. diff -c gopher+/gopher/gopher.c:3.54 gopher+/gopher/gopher.c:3.61
  995. *** gopher+/gopher/gopher.c:3.54    Fri Nov  5 01:49:54 1993
  996. --- gopher+/gopher/gopher.c    Fri Nov  5 01:49:54 1993
  997. ***************
  998. *** 1,7 ****
  999.   /********************************************************************
  1000.    * lindner
  1001. !  * 3.54
  1002. !  * 1993/10/20 03:24:55
  1003.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.c,v
  1004.    * Exp
  1005.    *
  1006. --- 1,7 ----
  1007.   /********************************************************************
  1008.    * lindner
  1009. !  * 3.61
  1010. !  * 1993/11/03 03:55:12
  1011.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.c,v
  1012.    * Exp
  1013.    *
  1014. ***************
  1015. *** 15,20 ****
  1016. --- 15,41 ----
  1017.    *********************************************************************
  1018.    * Revision History:
  1019.    * gopher.c,v
  1020. +  * Revision 3.61  1993/11/03  03:55:12  lindner
  1021. +  * More stable file caching, subject line chopping in Gripe
  1022. +  *
  1023. +  * Revision 3.60  1993/11/02  21:17:36  lindner
  1024. +  * Better client side logging code
  1025. +  *
  1026. +  * Revision 3.59  1993/10/27  18:52:14  lindner
  1027. +  * Simplify VMS fixed/variable file code
  1028. +  *
  1029. +  * Revision 3.58  1993/10/26  18:45:09  lindner
  1030. +  * Move screen refresh stuff to CURwgetch()
  1031. +  *
  1032. +  * Revision 3.57  1993/10/26  18:01:01  lindner
  1033. +  * Allow saving to variable length record VMS files, remove Interrupted msg
  1034. +  *
  1035. +  * Revision 3.56  1993/10/22  20:24:14  lindner
  1036. +  * Fixes for VMS tempnam() (Fote)
  1037. +  *
  1038. +  * Revision 3.55  1993/10/22  20:06:37  lindner
  1039. +  * Add optional client logging
  1040. +  *
  1041.    * Revision 3.54  1993/10/20  03:24:55  lindner
  1042.    * Cleanup on a SIGHUP signal
  1043.    *
  1044. ***************
  1045. *** 364,370 ****
  1046.        int i;
  1047.        FILE *f;
  1048.   #ifdef VMS
  1049. !      char MailAddress[512], tmpfilename[512];
  1050.   #endif
  1051.   
  1052.        GSgetginfo(gs);
  1053. --- 385,391 ----
  1054.        int i;
  1055.        FILE *f;
  1056.   #ifdef VMS
  1057. !      char MailAddress[512], *tmpfilename;
  1058.   #endif
  1059.   
  1060.        GSgetginfo(gs);
  1061. ***************
  1062. *** 401,413 ****
  1063.        }
  1064.   
  1065.   #ifdef VMS
  1066. !      if (strchr(email, '@') && !strchr(email, '\"'))
  1067.          sprintf(MailAddress, MAIL_ADRS, email);
  1068.        else
  1069.          strcpy(MailAddress, email);
  1070.   
  1071. !      strcpy(tmpfilename, cp = tempnam(NULL, NULL));
  1072. !      free(cp);
  1073.   
  1074.        if ((f = fopen(tmpfilename, "w")) == NULL) {
  1075.         CursesErrorMsg("Cannot send mail...");
  1076. --- 422,433 ----
  1077.        }
  1078.   
  1079.   #ifdef VMS
  1080. !      if ((strchr(email, '@') != NULL) && (strchr(email, '\"') == NULL))
  1081.          sprintf(MailAddress, MAIL_ADRS, email);
  1082.        else
  1083.          strcpy(MailAddress, email);
  1084.   
  1085. !      tmpfilename = tempnam(NULL,NULL);
  1086.   
  1087.        if ((f = fopen(tmpfilename, "w")) == NULL) {
  1088.         CursesErrorMsg("Cannot send mail...");
  1089. ***************
  1090. *** 414,420 ****
  1091.         return;
  1092.        }
  1093.   
  1094. !      sprintf(mailcmd, "%s/subject=\"%s\" %s %s",
  1095.              MAIL_COMMAND, gripemess[0], tmpfilename, MailAddress);
  1096.        free(gripemess[0]);
  1097.        for (i=1; i< 10; i++) {
  1098. --- 434,440 ----
  1099.         return;
  1100.        }
  1101.   
  1102. !      sprintf(mailcmd, "%s/subject=\"%.70s\" %s %s",
  1103.              MAIL_COMMAND, gripemess[0], tmpfilename, MailAddress);
  1104.        free(gripemess[0]);
  1105.        for (i=1; i< 10; i++) {
  1106. ***************
  1107. *** 427,432 ****
  1108. --- 447,453 ----
  1109.        printf("Mailing gripe to %s...", MailAddress);
  1110.        system(mailcmd);
  1111.        unlink(tmpfilename);
  1112. +      free(tmpfilename);
  1113.        CURenter(CursesScreen);
  1114.   #else
  1115.        sprintf(mailcmd, "%s %s", MAIL_COMMAND, email);
  1116. ***************
  1117. *** 437,443 ****
  1118.         return;
  1119.        }
  1120.   
  1121. !      fprintf(f, "Subject: %s\n\n", gripemess[0]);
  1122.        free(gripemess[0]);
  1123.        for (i=1; i< 10; i++) {
  1124.         fprintf(f, "%s\n", gripemess[i]);
  1125. --- 458,464 ----
  1126.         return;
  1127.        }
  1128.   
  1129. !      fprintf(f, "Subject: %.70s\n\n", gripemess[0]);
  1130.        free(gripemess[0]);
  1131.        for (i=1; i< 10; i++) {
  1132.         fprintf(f, "%s\n", gripemess[i]);
  1133. ***************
  1134. *** 579,590 ****
  1135.   showfile(ZeGopher)
  1136.     GopherObj *ZeGopher;
  1137.   {
  1138. - #ifdef VMS
  1139. -      /** Need char array for GSsetLocalFile() to be reliable on VMS **/
  1140. -      char    tmpfilename[512], *cp;
  1141. - #else
  1142.        char    *tmpfilename = NULL;
  1143. - #endif
  1144.        FILE    *tmpfile;
  1145.        char    inputline[512];
  1146.        char    outputline[512];
  1147. --- 600,606 ----
  1148. ***************
  1149. *** 628,642 ****
  1150.         } else {
  1151.              /** Open a temporary file **/
  1152.   #ifdef VMS
  1153. !            strcpy(tmpfilename, cp=tempnam(NULL,NULL));
  1154. !            free(cp);
  1155.   #else
  1156.              tmpfilename = tempnam("/tmp","gopher");
  1157.   #endif
  1158.   
  1159. !            if ((tmpfile = fopen(tmpfilename, "w")) == NULL)
  1160.               fprintf(stderr, "Couldn't make a tmp file!\n"), 
  1161.               CleanupandExit(-1);
  1162.              GSsetLocalFile(ZeGopher, tmpfilename);
  1163.         } /* | */
  1164.         
  1165. --- 644,676 ----
  1166.         } else {
  1167.              /** Open a temporary file **/
  1168.   #ifdef VMS
  1169. !            tmpfilename = tempnam(NULL,NULL);
  1170.   #else
  1171.              tmpfilename = tempnam("/tmp","gopher");
  1172.   #endif
  1173.   
  1174. ! #if defined(VMS)  && defined(VMSRecords)
  1175. !            if (GSgetType(ZeGopher) == A_FILE ||
  1176. !                GSgetType(ZeGopher) == A_MIME ||
  1177. !            GSgetType(ZeGopher) == A_CSO)
  1178. !             /*** Use VARIABLE length records for text on VMS ***/
  1179. !             tmpfile = fopen_VAR(tmpfilename, "w");
  1180. !            else
  1181. !             /*** Use FIXED 512 records for binaries on VMS ***/
  1182. !                 tmpfile = fopen_FIX(tmpfilename, "w");
  1183. !            if (tmpfile == NULL) {
  1184. ! #else
  1185. !            if ((tmpfile = fopen(tmpfilename, "w")) == NULL) {
  1186. ! #endif
  1187. !             CURexit(CursesScreen);
  1188.               fprintf(stderr, "Couldn't make a tmp file!\n"), 
  1189.               CleanupandExit(-1);
  1190. +            }
  1191. +            if (GSgetLocalFile(ZeGopher) != NULL &&
  1192. +            GSgetLocalView(ZeGopher) != NULL &&
  1193. +            strcmp(GSgetLocalView(ZeGopher), view) != 0)
  1194. +             unlink(GSgetLocalFile(ZeGopher));
  1195.              GSsetLocalFile(ZeGopher, tmpfilename);
  1196.         } /* | */
  1197.         
  1198. ***************
  1199. *** 659,665 ****
  1200.               return;
  1201.              }
  1202.         }  /* Forkoff */
  1203.   #endif
  1204.         
  1205.          Debug("showfile: view=%s ",view);
  1206. --- 693,698 ----
  1207. ***************
  1208. *** 684,692 ****
  1209. --- 717,728 ----
  1210.   
  1211.        } /* GopehrPluss || LocalFile = NULL */
  1212.   
  1213. +      logrequest("ARRIVED AT", ZeGopher);
  1214.   
  1215.        if (!WritePipe && GS2FileSucceeded)
  1216.         GSdisplay(ZeGopher);
  1217. +      if (!GS2FileSucceeded)
  1218. +           unlink(tmpfilename);
  1219.   
  1220.   /*     if (!ForkOff) {
  1221.         printf("\nPress <RETURN> to continue: ");
  1222. ***************
  1223. *** 696,704 ****
  1224.         CURenter(CursesScreen);
  1225.        }*/
  1226.   
  1227. ! #ifndef VMS
  1228.        if (tmpfilename!=NULL) free(tmpfilename);
  1229. - #endif
  1230.   
  1231.        if (ForkOff)
  1232.         exit(-1);
  1233. --- 732,739 ----
  1234.         CURenter(CursesScreen);
  1235.        }*/
  1236.   
  1237.        if (tmpfilename!=NULL) free(tmpfilename);
  1238.   
  1239.        if (ForkOff)
  1240.         exit(-1);
  1241. ***************
  1242. *** 836,843 ****
  1243.        if (ChangedDefs)
  1244.         RCtoFile(GlobalRC);
  1245.   
  1246. - /*     RCdestroy(GlobalRC);*/
  1247.        do {
  1248.         if (CurrentDir != NULL && CurrentDir != RCgetBookmarkDir(GlobalRC))
  1249.              GDdestroy(CurrentDir);
  1250. --- 871,876 ----
  1251. ***************
  1252. *** 849,855 ****
  1253.         if (gd != NULL)
  1254.              GDdestroy(gd);
  1255.        }
  1256.   #ifdef VMS
  1257.        DidCleanup = TRUE;
  1258.   #endif
  1259. --- 882,888 ----
  1260.         if (gd != NULL)
  1261.              GDdestroy(gd);
  1262.        }
  1263. !      logrequest("EXIT", NULL);
  1264.   #ifdef VMS
  1265.        DidCleanup = TRUE;
  1266.   #endif
  1267. ***************
  1268. *** 1397,1408 ****
  1269.        while (bDone == FALSE)
  1270.        {
  1271.         /* Set up a longjmp for control-cs **/
  1272. - #ifdef VMS
  1273.         setjmp(Jmpenv);
  1274. - #else
  1275. -       if (setjmp(Jmpenv))
  1276. -            CursesErrorMsg("Interrupted...");
  1277. - #endif
  1278.   
  1279.         GetMenu(CurrentDir, &TypedChar, Garbled);
  1280.   
  1281. --- 1430,1436 ----
  1282. ***************
  1283. *** 1417,1432 ****
  1284.               ;  /** Don't do anything if we failed, I guess **/
  1285.              break;
  1286.              
  1287. -       case '\014': /* ^L */
  1288. - #ifdef VMS
  1289. -       case '\022': /* ^R */
  1290. -       case '\027': /* ^W */
  1291. -            CURexit(CursesScreen);
  1292. -            CURenter(CursesScreen);
  1293. - #endif
  1294. -            /*** Redraw the screen ***/
  1295. -            break;
  1296.         case '\0':
  1297.              /*** What the heck? ***/
  1298.              CursesErrorMsg("Strange Error occurred!");
  1299. --- 1445,1450 ----
  1300. ***************
  1301. *** 1440,1445 ****
  1302. --- 1458,1465 ----
  1303.         {
  1304.              GopherDirObj *tempGdir;
  1305.   
  1306. +            logrequest("PREVIOUS DIRECTORY", NULL);
  1307.              /*** Don't highlight texts which aren't search hits ***/
  1308.              Searchstring = NULL;
  1309.   
  1310. ***************
  1311. *** 1532,1537 ****
  1312. --- 1552,1559 ----
  1313.   
  1314.         case 'v':  /** View bookmark list **/
  1315.         {
  1316. +            logrequest("VIEW BOOKMARKS", NULL);
  1317.              if (RCgetBookmarkDir(GlobalRC) == NULL) {
  1318.               CursesErrorMsg("No bookmarks are defined");
  1319.               break;
  1320. ***************
  1321. *** 1569,1574 ****
  1322. --- 1591,1598 ----
  1323.               }
  1324.              }
  1325.   
  1326. +            logrequest("ADD BOOKMARK", tmpgs);
  1327.              GSdestroy(tmpgs);
  1328.   
  1329.              break;
  1330. ***************
  1331. *** 1617,1623 ****
  1332.                ChangedDefs = TRUE;
  1333.               }
  1334.              }
  1335. !            free(tmpgs);
  1336.              break;
  1337.         }
  1338.   
  1339. --- 1641,1649 ----
  1340.                ChangedDefs = TRUE;
  1341.               }
  1342.              }
  1343. !            logrequest("ADD BOOKMARK", tmpgs);
  1344. !            GSdestroy(tmpgs);
  1345.              break;
  1346.         }
  1347.   
  1348. ***************
  1349. *** 1625,1630 ****
  1350. --- 1651,1658 ----
  1351.         {
  1352.              GopherDirObj *tempgd;
  1353.   
  1354. +            logrequest("DELETE BOOKMARK", GDgetEntry(CurrentDir, GDgetCurrentItem(CurrentDir)-1));
  1355. +            
  1356.              tempgd=GDdeleteGS(CurrentDir,(GDgetCurrentItem(CurrentDir)-1));
  1357.   
  1358.              if (CurrentDir == RCgetBookmarkDir(GlobalRC))
  1359. ***************
  1360. *** 1829,1834 ****
  1361. --- 1857,1865 ----
  1362.         else
  1363.              GDfromNet(NewDir, sockfd, twirl);
  1364.   
  1365. +       logrequest("ARRIVED AT", ZeGopher);
  1366.         if (GDgetNumitems(NewDir) <= 0) {
  1367.              CursesErrorMsg("Nothing available.");
  1368.              failed = 1;
  1369. ***************
  1370. *** 1877,1887 ****
  1371. --- 1908,1923 ----
  1372.        /** Decide what to do with it.. **/
  1373.   
  1374.        Debug("process_request type=%c\n",GSgetType(ZeGopher));
  1375. +      logrequest("GOING TO", ZeGopher);
  1376.   
  1377.        switch(GSgetType(ZeGopher)) {
  1378.        case -1:
  1379.         break;
  1380.   
  1381. +      case A_INFO:
  1382. +       /** Do nothing **/
  1383. +       break;
  1384.        case A_FILE:
  1385.         Draw_Status("Receiving Information...");
  1386.         refresh();
  1387. ***************
  1388. *** 1989,2000 ****
  1389.     char *banner;
  1390.     GopherStruct *ZeGopher;
  1391.   {
  1392. - #ifdef VMS
  1393. -      /** Need char array for GSsetLocalFile() to be reliable on VMS **/
  1394. -      char tmpfilename[512], *cp;
  1395. - #else
  1396.        char *tmpfilename;
  1397. - #endif
  1398.        FILE *tmpfile;
  1399.        Blockobj *bl;
  1400.        int i,j, views;
  1401. --- 2025,2031 ----
  1402. ***************
  1403. *** 2007,2028 ****
  1404.        GSgetginfo(ZeGopher);
  1405.   
  1406.   #ifdef VMS
  1407. !      strcpy(tmpfilename, cp=tempnam(NULL,NULL));
  1408. !      free(cp);
  1409. !      Gopenfile = tmpfilename;
  1410.   #else
  1411.        Gopenfile = tmpfilename = tempnam("/tmp", "gopher");
  1412.   #endif
  1413.        GSsetLocalFile(infogs, tmpfilename);
  1414.        GSsetLocalView(infogs, "text/plain");
  1415. !      if ((tmpfile = fopen(tmpfilename, "w")) == NULL)
  1416.         fprintf(stderr, "Couldn't make a tmp file!\n"), 
  1417.         CleanupandExit(-1);
  1418.   
  1419. - #ifndef VMS
  1420.        free(tmpfilename);
  1421. - #endif
  1422.   
  1423.        GStoLink(ZeGopher, fileno(tmpfile));
  1424.   
  1425. --- 2038,2056 ----
  1426.        GSgetginfo(ZeGopher);
  1427.   
  1428.   #ifdef VMS
  1429. !      Gopenfile = tmpfilename = tempnam(NULL,NULL);
  1430.   #else
  1431.        Gopenfile = tmpfilename = tempnam("/tmp", "gopher");
  1432.   #endif
  1433.        GSsetLocalFile(infogs, tmpfilename);
  1434.        GSsetLocalView(infogs, "text/plain");
  1435. !      if ((tmpfile = fopen(tmpfilename, "w")) == NULL) {
  1436. !       CURexit(CursesScreen);
  1437.         fprintf(stderr, "Couldn't make a tmp file!\n"), 
  1438.         CleanupandExit(-1);
  1439. +      }
  1440.   
  1441.        free(tmpfilename);
  1442.   
  1443.        GStoLink(ZeGopher, fileno(tmpfile));
  1444.   
  1445. diff -c gopher+/gopher/gopherrc.c:3.18 gopher+/gopher/gopherrc.c:3.21
  1446. *** gopher+/gopher/gopherrc.c:3.18    Fri Nov  5 01:49:56 1993
  1447. --- gopher+/gopher/gopherrc.c    Fri Nov  5 01:49:56 1993
  1448. ***************
  1449. *** 1,7 ****
  1450.   /********************************************************************
  1451.    * lindner
  1452. !  * 3.18
  1453. !  * 1993/10/11 16:57:40
  1454.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/gopherrc.c,v
  1455.    * Exp
  1456.    *
  1457. --- 1,7 ----
  1458.   /********************************************************************
  1459.    * lindner
  1460. !  * 3.21
  1461. !  * 1993/11/05 07:26:11
  1462.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/gopherrc.c,v
  1463.    * Exp
  1464.    *
  1465. ***************
  1466. *** 15,20 ****
  1467. --- 15,29 ----
  1468.    *********************************************************************
  1469.    * Revision History:
  1470.    * gopherrc.c,v
  1471. +  * Revision 3.21  1993/11/05  07:26:11  lindner
  1472. +  * fix for Solaris
  1473. +  *
  1474. +  * Revision 3.20  1993/11/02  06:45:14  lindner
  1475. +  * Use /home/mudhoney/lindner instead of password routines to read gopherrc
  1476. +  *
  1477. +  * Revision 3.19  1993/10/22  20:25:51  lindner
  1478. +  * Fix for VMS logicals in RCfromENV() (Fote)
  1479. +  *
  1480.    * Revision 3.18  1993/10/11  16:57:40  lindner
  1481.    * Fote's mods for appending %s in display command handling, application/html becomes text/html
  1482.    *
  1483. ***************
  1484. *** 120,134 ****
  1485.   
  1486.   #include <stdio.h>
  1487.   
  1488. - #ifndef VMS
  1489. - #include <fcntl.h>
  1490. - #include <pwd.h>
  1491. - #endif
  1492.   #ifdef VMS
  1493.   #include <unixlib.h>
  1494.   #define MAXPATHLEN FILENAME_MAX
  1495.   #include <file.h>
  1496.   #endif
  1497.   
  1498.   #ifndef MAXPATHLEN
  1499. --- 129,141 ----
  1500.   
  1501.   #include <stdio.h>
  1502.   
  1503.   #ifdef VMS
  1504.   #include <unixlib.h>
  1505.   #define MAXPATHLEN FILENAME_MAX
  1506.   #include <file.h>
  1507. + #else
  1508. + #include <sys/file.h>
  1509. + #include <sys/fcntl.h>
  1510.   #endif
  1511.   
  1512.   #ifndef MAXPATHLEN
  1513. ***************
  1514. *** 395,409 ****
  1515.        char rcfilename[MAXPATHLEN];
  1516.        int rcfile;
  1517.   #ifndef VMS
  1518. !      struct passwd *pwdentry;
  1519. !      pwdentry = getpwuid(geteuid());
  1520. !      if (pwdentry == NULL)
  1521.         return(-1);
  1522.   
  1523.        /** First, let's find out if there is a bookmark file **/
  1524.   
  1525. !      strcpy(rcfilename,pwdentry->pw_dir);   /* Home directory */
  1526.        strcat(rcfilename,"/.gopherrc");
  1527.   
  1528.   #else
  1529. --- 402,416 ----
  1530.        char rcfilename[MAXPATHLEN];
  1531.        int rcfile;
  1532.   #ifndef VMS
  1533. !      char *home;
  1534. !      
  1535. !      home = getenv("HOME");
  1536. !      if (home == NULL)
  1537.         return(-1);
  1538.   
  1539.        /** First, let's find out if there is a bookmark file **/
  1540.   
  1541. !      strcpy(rcfilename,home);   /* Home directory */
  1542.        strcat(rcfilename,"/.gopherrc");
  1543.   
  1544.   #else
  1545. ***************
  1546. *** 481,493 ****
  1547.          strcpy(PrinterP, Printer);
  1548.        }
  1549.        else {
  1550. !       if(RCprintCommand(GlobalRC,"Text","",Printer))
  1551. !            Printer[strlen(Printer)-1] = '\0';
  1552.         else
  1553.              strcpy(Printer, PRINTER_COMMAND);
  1554.   
  1555. !       if(RCprintCommand(GlobalRC,"Text/plain","",PrinterP))
  1556. !            Printer[strlen(Printer)-1] = '\0';
  1557.         else
  1558.              strcpy(PrinterP, PRINTER_COMMAND);
  1559.        }
  1560. --- 488,504 ----
  1561.          strcpy(PrinterP, Printer);
  1562.        }
  1563.        else {
  1564. !       if(RCprintCommand(GlobalRC,"Text","",Printer)) {
  1565. !            if (Printer[strlen(Printer)-1] == ' ')
  1566. !                 Printer[strlen(Printer)-1] = '\0';
  1567. !       }
  1568.         else
  1569.              strcpy(Printer, PRINTER_COMMAND);
  1570.   
  1571. !       if(RCprintCommand(GlobalRC,"Text/plain","",PrinterP)) {
  1572. !            if (PrinterP[strlen(PrinterP)-1] = ' ')
  1573. !                 PrinterP[strlen(PrinterP)-1] = '\0';
  1574. !       }
  1575.         else
  1576.              strcpy(PrinterP, PRINTER_COMMAND);
  1577.        }
  1578. ***************
  1579. *** 500,519 ****
  1580.             RCMAfromLine(rc->commands, tmpstr);
  1581.        }
  1582.        else if (PrinterFlag) {
  1583. !       if(RCdisplayCommand(GlobalRC,"Text","",Pager))
  1584. !            Pager[strlen(Pager)-1] = '\0';
  1585.         else
  1586.              strcpy(Pager, PAGER_COMMAND);
  1587.   
  1588. !           sprintf(tmpstr, "Text,%s %%s,%s %%s", Pager, Printer);
  1589.             RCMAfromLine(rc->commands, tmpstr);
  1590.   
  1591. !       if(RCdisplayCommand(GlobalRC,"Text/plain","",PagerP))
  1592. !            PagerP[strlen(PagerP)-1] = '\0';
  1593.         else
  1594.              strcpy(PagerP, PAGER_COMMAND);
  1595.   
  1596. !           sprintf(tmpstr, "Text/plain,%s %%s,%s %%s", PagerP, Printer);
  1597.             RCMAfromLine(rc->commands, tmpstr);
  1598.        }
  1599.   
  1600. --- 511,540 ----
  1601.             RCMAfromLine(rc->commands, tmpstr);
  1602.        }
  1603.        else if (PrinterFlag) {
  1604. !       if (RCdisplayCommand(GlobalRC,"Text","",Pager)) {
  1605. !            if (Pager[strlen(Pager)-1] == ' ')
  1606. !                  Pager[strlen(Pager)-1] = '\0';
  1607. !       }
  1608.         else
  1609.              strcpy(Pager, PAGER_COMMAND);
  1610.   
  1611. !       if (strncasecmp(Pager, "builtin", 7) == 0)
  1612. !                sprintf(tmpstr, "Text,%s,%s %%s", Pager, Printer);
  1613. !       else
  1614. !                sprintf(tmpstr, "Text,%s %%s,%s %%s", Pager, Printer);
  1615.             RCMAfromLine(rc->commands, tmpstr);
  1616.   
  1617. !       if(RCdisplayCommand(GlobalRC,"Text/plain","",PagerP)) {
  1618. !            if (PagerP[strlen(PagerP)-1] == ' ')
  1619. !                  PagerP[strlen(PagerP)-1] = '\0';
  1620. !       }
  1621.         else
  1622.              strcpy(PagerP, PAGER_COMMAND);
  1623.   
  1624. !       if (strncasecmp(PagerP, "builtin", 7) == 0)
  1625. !                sprintf(tmpstr, "Text/plain,%s,%s %%s", PagerP, PrinterP);
  1626. !       else
  1627. !                sprintf(tmpstr, "Text/plain,%s %%s,%s %%s", PagerP, PrinterP);
  1628.             RCMAfromLine(rc->commands, tmpstr);
  1629.        }
  1630.   
  1631. ***************
  1632. *** 548,558 ****
  1633.   {
  1634.        int rcfile;
  1635.   #ifndef VMS
  1636. !      struct passwd *pwdentry;
  1637.   
  1638. !      pwdentry = getpwuid(geteuid());
  1639. !      if (pwdentry == NULL)
  1640.         return;
  1641.   #endif
  1642.        rcfile = rcopen(O_RDONLY);
  1643. --- 569,578 ----
  1644.   {
  1645.        int rcfile;
  1646.   #ifndef VMS
  1647. !      char *home;
  1648. !      home = getenv("HOME");
  1649.   
  1650. !      if (home == NULL)
  1651.         return;
  1652.   #endif
  1653.        rcfile = rcopen(O_RDONLY);
  1654. ***************
  1655. *** 643,653 ****
  1656.        char rcfilename[512];
  1657.        char oldrcfilename[512];
  1658.   #ifndef VMS
  1659. !      struct passwd *pwdentry;
  1660.   
  1661. !      pwdentry = getpwuid(geteuid());
  1662.   
  1663. !      if (pwdentry == NULL)
  1664.         return;
  1665.   #endif /* not VMS */
  1666.   
  1667. --- 663,673 ----
  1668.        char rcfilename[512];
  1669.        char oldrcfilename[512];
  1670.   #ifndef VMS
  1671. !      char *home;
  1672.   
  1673. !      home = getenv("HOME");
  1674.   
  1675. !      if (home == NULL)
  1676.         return;
  1677.   #endif /* not VMS */
  1678.   
  1679. ***************
  1680. *** 658,666 ****
  1681.        /** First, let's find out if there is a rc file **/
  1682.   
  1683.   #ifndef VMS
  1684. !      strcpy(rcfilename,pwdentry->pw_dir);   /* Home directory */
  1685.        strcat(rcfilename,"/.gopherrc");
  1686. !      strcpy(oldrcfilename,pwdentry->pw_dir); 
  1687.        strcat(oldrcfilename,"/.gopherrc~");
  1688.   
  1689.        rcfile = open(rcfilename, O_RDONLY);
  1690. --- 678,686 ----
  1691.        /** First, let's find out if there is a rc file **/
  1692.   
  1693.   #ifndef VMS
  1694. !      strcpy(rcfilename,home);   /* Home directory */
  1695.        strcat(rcfilename,"/.gopherrc");
  1696. !      strcpy(oldrcfilename,home); 
  1697.        strcat(oldrcfilename,"/.gopherrc~");
  1698.   
  1699.        rcfile = open(rcfilename, O_RDONLY);
  1700. diff -c gopher+/gopher/html2.c:3.7 gopher+/gopher/html2.c:3.8
  1701. *** gopher+/gopher/html2.c:3.7    Fri Nov  5 01:49:57 1993
  1702. --- gopher+/gopher/html2.c    Fri Nov  5 01:49:57 1993
  1703. ***************
  1704. *** 1,7 ****
  1705.   /********************************************************************
  1706.    * lindner
  1707. !  * 3.7
  1708. !  * 1993/10/11 17:03:46
  1709.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/html2.c,v
  1710.    * Exp
  1711.    *
  1712. --- 1,7 ----
  1713.   /********************************************************************
  1714.    * lindner
  1715. !  * 3.8
  1716. !  * 1993/10/22 20:27:10
  1717.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/html2.c,v
  1718.    * Exp
  1719.    *
  1720. ***************
  1721. *** 15,20 ****
  1722. --- 15,23 ----
  1723.    *********************************************************************
  1724.    * Revision History:
  1725.    * html2.c,v
  1726. +  * Revision 3.8  1993/10/22  20:27:10  lindner
  1727. +  * Fix for trailing blanks on HTML viewer (Fote)
  1728. +  *
  1729.    * Revision 3.7  1993/10/11  17:03:46  lindner
  1730.    * application/html-->text/html, and simplified test for absence of a display command (Fote)
  1731.    *
  1732. ***************
  1733. *** 424,430 ****
  1734.             return;
  1735.        }
  1736.        else
  1737. !           HTMLcmd[strlen(HTMLcmd)-1] = '\0';
  1738.   
  1739.        if (strncmp(GSgetPath(ZeGopher), "GET /", 5) == 0) {
  1740.         sprintf(command, "%s \"http://%s:%d/%s\"", HTMLcmd,
  1741. --- 427,434 ----
  1742.             return;
  1743.        }
  1744.        else
  1745. !           if (HTMLcmd[strlen(HTMLcmd)-1] == ' ')
  1746. !                HTMLcmd[strlen(HTMLcmd)-1] = '\0';
  1747.   
  1748.        if (strncmp(GSgetPath(ZeGopher), "GET /", 5) == 0) {
  1749.         sprintf(command, "%s \"http://%s:%d/%s\"", HTMLcmd,
  1750. diff -c gopher+/gopher/manager.c:3.12 gopher+/gopher/manager.c:3.15
  1751. *** gopher+/gopher/manager.c:3.12    Fri Nov  5 01:49:57 1993
  1752. --- gopher+/gopher/manager.c    Fri Nov  5 01:49:57 1993
  1753. ***************
  1754. *** 1,7 ****
  1755.   /********************************************************************
  1756.    * lindner
  1757. !  * 3.12
  1758. !  * 1993/09/08 01:22:30
  1759.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/manager.c,v
  1760.    * Exp
  1761.    *
  1762. --- 1,7 ----
  1763.   /********************************************************************
  1764.    * lindner
  1765. !  * 3.15
  1766. !  * 1993/10/26 18:43:20
  1767.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/manager.c,v
  1768.    * Exp
  1769.    *
  1770. ***************
  1771. *** 15,20 ****
  1772. --- 15,29 ----
  1773.    *********************************************************************
  1774.    * Revision History:
  1775.    * manager.c,v
  1776. +  * Revision 3.15  1993/10/26  18:43:20  lindner
  1777. +  * Fix for multiply defined cases
  1778. +  *
  1779. +  * Revision 3.14  1993/10/22  20:30:34  lindner
  1780. +  * Fixes for menu drawing (Beckett)
  1781. +  *
  1782. +  * Revision 3.13  1993/10/22  20:05:20  lindner
  1783. +  * Add Movie (;) and Info (i) type support
  1784. +  *
  1785.    * Revision 3.12  1993/09/08  01:22:30  lindner
  1786.    * Add support for HTML and MIME on the menu displays
  1787.    *
  1788. ***************
  1789. *** 95,104 ****
  1790.   {
  1791.        char line[80];
  1792.   
  1793. -      standout();
  1794.        sprintf(line, "Internet Gopher Information Client %s.%s pl%d", GOPHER_MAJOR_VERSION, GOPHER_MINOR_VERSION, PATCHLEVEL);
  1795. !      CURcenterline(CursesScreen,line, 0);
  1796. !      standend();
  1797.   }     
  1798.   
  1799.   
  1800. --- 104,111 ----
  1801.   {
  1802.        char line[80];
  1803.   
  1804.        sprintf(line, "Internet Gopher Information Client %s.%s pl%d", GOPHER_MAJOR_VERSION, GOPHER_MINOR_VERSION, PATCHLEVEL);
  1805. !      CURcenterline(CursesScreen, stdscr, line, 0, COLS, TRUE);
  1806.   }     
  1807.   
  1808.   
  1809. ***************
  1810. *** 110,117 ****
  1811.   Draw_Status(textline)
  1812.     char *textline;
  1813.   {
  1814. -      move(LINES-1, 0);
  1815. -      clrtoeol();
  1816.        mvaddstr(LINES-1, 0, "Press ");
  1817.        standout();
  1818.        addstr("?");
  1819. --- 117,122 ----
  1820. ***************
  1821. *** 125,135 ****
  1822.        addstr(" to Quit");
  1823.        
  1824.   #ifndef AUTOEXITONU
  1825. !      addstr(", ");
  1826. !      standout();
  1827. !      addstr("u");
  1828. !      standend();
  1829. !      addstr(" to go up a menu");
  1830.   #endif
  1831.        clrtoeol();
  1832.   
  1833. --- 130,142 ----
  1834.        addstr(" to Quit");
  1835.        
  1836.   #ifndef AUTOEXITONU
  1837. !      if (iLevel != 0) {
  1838. !       addstr(", ");
  1839. !       standout();
  1840. !       addstr("u");
  1841. !       standend();
  1842. !       addstr(" to go up a menu");
  1843. !      }
  1844.   #endif
  1845.        clrtoeol();
  1846.   
  1847. ***************
  1848. *** 158,163 ****
  1849. --- 165,173 ----
  1850.         size = VIgetSize(GSgetView(gs, 0));
  1851.        }
  1852.   
  1853. +      if (GSisAsk(gs))
  1854. +       max -= 5;
  1855.        switch(type)
  1856.        {
  1857.        case A_DIRECTORY:
  1858. ***************
  1859. *** 171,182 ****
  1860.         max -=4;
  1861.         break;
  1862.        case A_CSO:
  1863. -      case A_TN3270:
  1864.        case A_TELNET:
  1865.        case A_UNIXBIN:
  1866.        case A_MACHEX:
  1867.         max -=6;
  1868.         break;
  1869.        case A_PCBIN:
  1870.         max -=9;
  1871.         break;
  1872. --- 181,196 ----
  1873.         max -=4;
  1874.         break;
  1875.        case A_CSO:
  1876.        case A_TELNET:
  1877.        case A_UNIXBIN:
  1878.        case A_MACHEX:
  1879.         max -=6;
  1880.         break;
  1881. +      case A_TN3270:
  1882. +      case A_MIME:
  1883. +      case A_HTML:
  1884. +       max -= 7;
  1885. +       break;
  1886.        case A_PCBIN:
  1887.         max -=9;
  1888.         break;
  1889. ***************
  1890. *** 184,198 ****
  1891.        case A_IMAGE:
  1892.         max -= 10;
  1893.         break;
  1894. !      case A_MIME:
  1895. !        max -= 9;
  1896. !        break;
  1897. !      case A_HTML:
  1898. !       max -= 9;
  1899. !       break;
  1900.        }
  1901.        
  1902.        if((m = strlen(d)) <= max)
  1903.         printw(" %s", d);
  1904.        else {
  1905. --- 198,210 ----
  1906.        case A_IMAGE:
  1907.         max -= 10;
  1908.         break;
  1909. !      case A_MOVIE:
  1910. !       max -= 10;
  1911.        }
  1912.        
  1913. +      if (d==NULL)
  1914. +       d = "error";
  1915. +      
  1916.        if((m = strlen(d)) <= max)
  1917.         printw(" %s", d);
  1918.        else {
  1919. ***************
  1920. *** 253,259 ****
  1921.        case A_HTML:
  1922.         addstr(" <HTML>");
  1923.         break;
  1924. !       
  1925.        }
  1926.   
  1927.        if (GSisAsk(gs))
  1928. --- 265,273 ----
  1929.        case A_HTML:
  1930.         addstr(" <HTML>");
  1931.         break;
  1932. !      case A_MOVIE:
  1933. !       addstr(" <Movie>");
  1934. !       break;
  1935.        }
  1936.   
  1937.        if (GSisAsk(gs))
  1938. ***************
  1939. *** 342,348 ****
  1940.        if (nOldPage != nNewPage)    {
  1941.       Display_Dir_Page(gophersdir,
  1942.                           iNewLine, nNewPage, nMaxPages, iPageLen, iLastPageLen);
  1943. !     CURcenterline(CursesScreen,GDgetTitle(gophersdir), 2);       /*** Draw the title ***/
  1944.      }
  1945.       
  1946.   
  1947. --- 356,363 ----
  1948.        if (nOldPage != nNewPage)    {
  1949.       Display_Dir_Page(gophersdir,
  1950.                           iNewLine, nNewPage, nMaxPages, iPageLen, iLastPageLen);
  1951. !     /*** Draw the title ***/
  1952. !     CURcenterline(CursesScreen, stdscr, GDgetTitle(gophersdir), 2, COLS, FALSE);
  1953.      }
  1954.       
  1955.   
  1956. ***************
  1957. *** 391,397 ****
  1958.        if (redisplay == TRUE) {
  1959.   
  1960.         /*** Draw the title ***/
  1961. !       CURcenterline(CursesScreen,GDgetTitle(gd), 2);
  1962.   
  1963.         /* Move to the last line that we were sitting on */
  1964.         iItem = scline(iItem, iNewItem, gd);
  1965. --- 406,412 ----
  1966.        if (redisplay == TRUE) {
  1967.   
  1968.         /*** Draw the title ***/
  1969. !       CURcenterline(CursesScreen, stdscr, GDgetTitle(gd), 2, COLS, FALSE);
  1970.   
  1971.         /* Move to the last line that we were sitting on */
  1972.         iItem = scline(iItem, iNewItem, gd);
  1973. diff -c gopher+/gopher/ourutils.c:3.40 gopher+/gopher/ourutils.c:3.46
  1974. *** gopher+/gopher/ourutils.c:3.40    Fri Nov  5 01:49:58 1993
  1975. --- gopher+/gopher/ourutils.c    Fri Nov  5 01:49:58 1993
  1976. ***************
  1977. *** 1,7 ****
  1978.   /********************************************************************
  1979.    * lindner
  1980. !  * 3.40
  1981. !  * 1993/10/11 17:20:43
  1982.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/ourutils.c,v
  1983.    * Exp
  1984.    *
  1985. --- 1,7 ----
  1986.   /********************************************************************
  1987.    * lindner
  1988. !  * 3.46
  1989. !  * 1993/11/03 03:50:01
  1990.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/ourutils.c,v
  1991.    * Exp
  1992.    *
  1993. ***************
  1994. *** 15,20 ****
  1995. --- 15,38 ----
  1996.    *********************************************************************
  1997.    * Revision History:
  1998.    * ourutils.c,v
  1999. +  * Revision 3.46  1993/11/03  03:50:01  lindner
  2000. +  * More fixes for VMSrecords
  2001. +  *
  2002. +  * Revision 3.45  1993/11/02  21:17:44  lindner
  2003. +  * Better client side logging code
  2004. +  *
  2005. +  * Revision 3.44  1993/10/27  18:52:17  lindner
  2006. +  * Simplify VMS fixed/variable file code
  2007. +  *
  2008. +  * Revision 3.43  1993/10/26  18:22:43  lindner
  2009. +  * Mucho changes for VMS variable length records
  2010. +  *
  2011. +  * Revision 3.42  1993/10/22  20:33:17  lindner
  2012. +  * Fixed bad code in Save_file() for choosing view (Fote)
  2013. +  *
  2014. +  * Revision 3.41  1993/10/22  20:06:46  lindner
  2015. +  * Add optional client logging
  2016. +  *
  2017.    * Revision 3.40  1993/10/11  17:20:43  lindner
  2018.    * Fix for data/time stripping, vms multidot files, no case comparision for builtin
  2019.    *
  2020. ***************
  2021. *** 298,309 ****
  2022.   #ifdef VMS
  2023.        /* encase any address with '@' in double-quotes and add transport */
  2024.        /* if the user hasn't done it (based on code from Earl Fogel)     */
  2025. !      if (strchr(SaveName, '@') && !strchr(SaveName, '\"'))
  2026.          sprintf(MailAddress, MAIL_ADRS, SaveName);
  2027.        else
  2028.          strcpy(MailAddress, SaveName);
  2029.   
  2030. !      sprintf(command, "%s/subject=\"%s\" %s %s",
  2031.              MAIL_COMMAND, Realname, Filename, MailAddress);
  2032.   
  2033.        CURexit(CursesScreen);
  2034. --- 316,327 ----
  2035.   #ifdef VMS
  2036.        /* encase any address with '@' in double-quotes and add transport */
  2037.        /* if the user hasn't done it (based on code from Earl Fogel)     */
  2038. !      if ((strchr(SaveName, '@') != NULL) && (strchr(SaveName, '\"') == NULL))
  2039.          sprintf(MailAddress, MAIL_ADRS, SaveName);
  2040.        else
  2041.          strcpy(MailAddress, SaveName);
  2042.   
  2043. !      sprintf(command, "%s/subject=\"%.70s\" %s %s",
  2044.              MAIL_COMMAND, Realname, Filename, MailAddress);
  2045.   
  2046.        CURexit(CursesScreen);
  2047. ***************
  2048. *** 322,328 ****
  2049.         return;
  2050.        }
  2051.   
  2052. !      fprintf(mailit, "Subject: %s\n\n", Realname);
  2053.   
  2054.        while (readline(fileno(infile), buf, sizeof(buf))) {
  2055.         twirl();
  2056. --- 340,346 ----
  2057.         return;
  2058.        }
  2059.   
  2060. !      fprintf(mailit, "Subject: %.70s\n\n", Realname);
  2061.   
  2062.        while (readline(fileno(infile), buf, sizeof(buf))) {
  2063.         twirl();
  2064. ***************
  2065. *** 491,497 ****
  2066.              items[Asknum]->thing = CUR_CHOICE;
  2067.              items[Asknum]->chooseitem = 0;
  2068.              
  2069. !            items[Asknum]->choices = (char**) malloc(sizeof(char*)*20);
  2070.   
  2071.              /*** add list of choices to struct **/
  2072.              while ((cp = strchr(defaultval, '\t')) != NULL) {
  2073. --- 509,515 ----
  2074.              items[Asknum]->thing = CUR_CHOICE;
  2075.              items[Asknum]->chooseitem = 0;
  2076.              
  2077. !            items[Asknum]->choices = (char**) malloc(sizeof(char*)*100);
  2078.   
  2079.              /*** add list of choices to struct **/
  2080.              while ((cp = strchr(defaultval, '\t')) != NULL) {
  2081. ***************
  2082. *** 722,729 ****
  2083. --- 740,754 ----
  2084.        }
  2085.        else {
  2086.              
  2087. + #if defined(VMS) && defined(VMSRecords)
  2088. +           while((numread = readrecvbuf(sockfd, buf, 512)) > 0) {
  2089. +            if (numread < 512)
  2090. +            for (i = numread; i < 512; i++)  buf[i] = 0;
  2091. +                if (fwrite(buf, 512, 1, f) == 0) {
  2092. + #else
  2093.         while ((numread = readrecvbuf(sockfd, buf, sizeof buf)) > 0) {
  2094.              if (fwrite(buf, numread, 1, f) == 0) {
  2095. + #endif
  2096.               CursesErrorMsg("Problems Writing");
  2097.               closenet(sockfd);
  2098.               return(FALSE);
  2099. ***************
  2100. *** 940,945 ****
  2101. --- 965,971 ----
  2102.        char    *cp;
  2103.        char    buf[1024];
  2104.        boolean Openpipe = FALSE;
  2105. +      boolean GS2FileSucceeded = TRUE;
  2106.        FILE    *f;
  2107.   
  2108.        switch (GSgetType(gs)) {
  2109. ***************
  2110. *** 951,966 ****
  2111.              CursesErrorMsg("Sorry, can't save that item to a file!");
  2112.              return;
  2113.         }
  2114. -       if (saveto == NULL)
  2115. -            return;
  2116.   
  2117. -       if (view == NULL)
  2118. -            view = Choose_View(gs);
  2119. -       if (view == NULL || view == "")
  2120. -            return;
  2121.        }
  2122.   
  2123.        /*** Get the Title ***/
  2124.        strcpy(Title, GSgetTitle(gs));
  2125.   
  2126. --- 977,991 ----
  2127.              CursesErrorMsg("Sorry, can't save that item to a file!");
  2128.              return;
  2129.         }
  2130.   
  2131.        }
  2132.   
  2133. +      if (view == NULL)
  2134. +           view = Choose_View(gs);
  2135. +      if (view == NULL || view == "")
  2136. +       return;
  2137.        /*** Get the Title ***/
  2138.        strcpy(Title, GSgetTitle(gs));
  2139.   
  2140. ***************
  2141. *** 1031,1040 ****
  2142. --- 1056,1074 ----
  2143.        }
  2144.   #endif
  2145.   
  2146. + #if defined(VMS) && defined(VMSRecords)
  2147. +      if (GSisText(gs, view))
  2148. +           /*** Save ASCII files as VARIABLE length records for VMS ***/
  2149. +       f = fopen_VAR(saveto, "w+");
  2150. +      else
  2151. +           /*** Save binary files as FIXED 512 records for VMS ***/
  2152. +       f = fopen_FIX(saveto, "w+");
  2153. + #else
  2154.        if (Openpipe)
  2155.         f = popen(saveto, "w+");
  2156.        else
  2157.         f = fopen(saveto, "w+");
  2158. + #endif
  2159.   
  2160.        if (f == NULL) {
  2161.         char tempstr[128];
  2162. ***************
  2163. *** 1074,1084 ****
  2164.        } else {
  2165.         /** We don't have the file yet, let's get it... **/
  2166.         
  2167. !       GStoFile(gs, f, view, twirl);  /* false if fails */
  2168.         if (Openpipe)
  2169.              pclose(f);
  2170.         else
  2171.              fclose(f);
  2172.        }
  2173.   }
  2174.              
  2175. --- 1108,1122 ----
  2176.        } else {
  2177.         /** We don't have the file yet, let's get it... **/
  2178.         
  2179. !       GS2FileSucceeded = GStoFile(gs, f, view, twirl); /* false if fails */
  2180.         if (Openpipe)
  2181.              pclose(f);
  2182.         else
  2183.              fclose(f);
  2184. +       if (!GS2FileSucceeded)
  2185. +            unlink(saveto);
  2186.        }
  2187.   }
  2188.              
  2189. ***************
  2190. *** 1153,1162 ****
  2191. --- 1191,1204 ----
  2192.        }
  2193.   #endif
  2194.   
  2195. + #if defined(VMS) && defined(VMSRecords)
  2196. +      f = fopen_VAR(saveto, "w+");
  2197. + #else
  2198.        if (Openpipe)
  2199.         f = popen(saveto, "w+");
  2200.        else
  2201.         f = fopen(saveto, "w+");
  2202. + #endif
  2203.   
  2204.        if (f == NULL) {
  2205.         char tempstr[128];
  2206. ***************
  2207. *** 1413,1464 ****
  2208.   
  2209.   
  2210.   /*
  2211. - ** This mini pager is intended for people worried about shell escapes from
  2212. - ** more or less or whatever
  2213. - */
  2214. - /*Ourpager(filename)
  2215. -   char *filename;
  2216. - {
  2217. -      FILE *InFile;
  2218. -      int i;
  2219. -      char inputline[512], *cp;
  2220. -      int Done = FALSE;
  2221. -      char ZeTypedChar;
  2222. -      
  2223. -      if ((InFile = fopen(filename, "r")) == NULL)
  2224. -       return;
  2225. -      while (Done == FALSE) {
  2226. -       tputs(CURgetCLS(CursesScreen),1,outchar);
  2227. -       for (i=0 ; i < LINES-1; i++) {
  2228. -            cp = fgets(inputline, 512, InFile);
  2229. -            ZapCRLF(inputline);
  2230. -            puts(inputline);
  2231. -       }
  2232. -       printf("----Press <ENTER> for next page, q to exit------");
  2233. -       
  2234. -       cbreak();
  2235. -       ZeTypedChar = getchar();
  2236. -       
  2237. -       if ((ZeTypedChar == 'q') || (cp == NULL)) {
  2238. -            printf("\n");
  2239. -            Done = TRUE;
  2240. -       }
  2241. -      }
  2242. -      cbreak();
  2243. -      fclose(InFile);
  2244. - }
  2245. - */
  2246. - /*
  2247.    * This displays a single line message using CUR routines
  2248.    */
  2249.        
  2250. --- 1455,1460 ----
  2251. ***************
  2252. *** 1493,1498 ****
  2253. --- 1489,1520 ----
  2254.        CursesMsg(Message, "Gopher Error");
  2255.   }
  2256.   
  2257. + #ifdef CLIENT_LOGGER
  2258. + #include <syslog.h>
  2259. + #endif
  2260. + logrequest(msg, gs)
  2261. +   char *msg;
  2262. +   GopherObj *gs;
  2263. + {
  2264. + #ifdef CLIENT_LOGGER
  2265. +      static boolean inited = FALSE;
  2266. +      char *url = "";
  2267. +      if (inited == FALSE) {
  2268. +       openlog("gopher", (LOG_PID), LOG_DAEMON);
  2269. +       setlogmask(LOG_UPTO(LOG_INFO));
  2270. +       inited = TRUE;
  2271. +      }
  2272. +      if (gs != NULL)
  2273. +       url = GSgetURL(gs);
  2274. +      syslog(LOG_INFO, "%s %s", msg, url);
  2275. + #endif
  2276. + }
  2277.   
  2278.   
  2279.   
  2280. diff -c gopher+/gopher/pager.c:3.6 gopher+/gopher/pager.c:3.8
  2281. *** gopher+/gopher/pager.c:3.6    Fri Nov  5 01:49:59 1993
  2282. --- gopher+/gopher/pager.c    Fri Nov  5 01:50:00 1993
  2283. ***************
  2284. *** 22,28 ****
  2285.   static int  currentpage = 0;
  2286.   
  2287.   
  2288. ! char *PagerHelp[8] = 
  2289.   {"u, ^G, left : exit pager",
  2290.    "space, down : Move to the next page",
  2291.    "b, up       : Move to the previous page",
  2292. --- 22,28 ----
  2293.   static int  currentpage = 0;
  2294.   
  2295.   
  2296. ! char *PagerHelp[9] = 
  2297.   {"u, ^G, left : exit pager",
  2298.    "space, down : Move to the next page",
  2299.    "b, up       : Move to the previous page",
  2300. ***************
  2301. *** 29,34 ****
  2302. --- 29,35 ----
  2303.    "/           : Search for text",
  2304.    "m           : mail current document",
  2305.    "s           : save current document",
  2306. +  "p           : print current document",
  2307.    "D           : download current document",
  2308.    NULL
  2309.    };
  2310. ***************
  2311. *** 254,260 ****
  2312. --- 255,266 ----
  2313.         cp = fgets(theline, COLS+1, thefile);
  2314.         if (cp == NULL)
  2315.              break;
  2316. + #if defined(VMS) && defined(VMSRecords)
  2317. +       *bytecount = ftell(thefile);
  2318. + #else
  2319.         *bytecount += strlen(theline);
  2320. + #endif
  2321.         ZapCRLF(theline);
  2322.         /** Bold the terms... **/
  2323.   
  2324. ***************
  2325. *** 293,299 ****
  2326. --- 299,309 ----
  2327.              if (cp == NULL)
  2328.               break;
  2329.              
  2330. + #if defined(VMS) && defined(VMSRecords)
  2331. +            *bytecount = ftell(thefile);
  2332. + #else
  2333.              *bytecount += strlen(theline);
  2334. + #endif
  2335.              
  2336.              if (strcasestr(cp, search) != NULL)
  2337.               return(TRUE);
  2338. ***************
  2339. *** 311,316 ****
  2340. --- 321,328 ----
  2341.        int         ch;
  2342.        FILE        *thefile;
  2343.        char        *theline, *cp;
  2344. +      char        *Dialogmess[3];
  2345. +      char        command[MAXSTR];
  2346.        boolean     done = FALSE;
  2347.        int         bytecount = 0;
  2348.        int         totalbytes = 0;
  2349. ***************
  2350. *** 321,327 ****
  2351.        PagerInitGlobals();
  2352.        
  2353.        /*** Initialize an array for the screen ... ***/
  2354. !      theline = (char *) malloc(COLS+1);
  2355.        *theline = '\0';
  2356.   
  2357.        stat(GSgetLocalFile(gs), &buf);
  2358. --- 333,339 ----
  2359.        PagerInitGlobals();
  2360.        
  2361.        /*** Initialize an array for the screen ... ***/
  2362. !      theline = (char *) malloc(sizeof(char)*(COLS+1));
  2363.        *theline = '\0';
  2364.   
  2365.        stat(GSgetLocalFile(gs), &buf);
  2366. ***************
  2367. *** 352,359 ****
  2368. --- 364,375 ----
  2369.         ch = CURgetch(cur);
  2370.   
  2371.         switch (ch) {
  2372. + #ifdef VMS
  2373. +       case '\032': /* ^Z */
  2374. + #endif
  2375.         case KEY_LEFT:
  2376.         case 'u':
  2377. +       case 'q':
  2378.         case '\007':
  2379.              done = TRUE;
  2380.              break;
  2381. ***************
  2382. *** 387,420 ****
  2383.         case KEY_HELP:
  2384.         case '?':
  2385.              CURDialog(cur, "Pager Help", PagerHelp);
  2386.   
  2387. !       case '\014': /* ^L */
  2388.   #ifdef VMS
  2389. !       case '\022': /* ^R */
  2390. !       case '\027': /* ^W */
  2391. !            CURexit(CursesScreen);
  2392. !            CURenter(CursesScreen);
  2393.   #endif
  2394. !            wclear(stdscr);
  2395. !            PagerTitles(cur, gs, totalbytes);
  2396. !            PagerSeekPage(thefile, currentpage-1, &bytecount);
  2397. !            PagerNextPage(thefile, theline, &bytecount);
  2398. !            
  2399. !            break;
  2400.   
  2401. !       case 'p':
  2402.   
  2403.              break;
  2404.   
  2405.         case 's':
  2406. !            if (!SecureMode || NoShellMode)
  2407.               Save_file(gs, NULL, GSgetLocalView(gs));
  2408.              else
  2409.               CursesErrorMsg("Sorry, you are not allowed to save files");
  2410.   
  2411. !            PagerSeekPage(thefile, currentpage-1, &bytecount);
  2412. !            PagerNextPage(thefile, theline, &bytecount);
  2413.              break;
  2414.   
  2415.         case 'D':
  2416. --- 403,453 ----
  2417.         case KEY_HELP:
  2418.         case '?':
  2419.              CURDialog(cur, "Pager Help", PagerHelp);
  2420. +            touchwin(stdscr);
  2421. +            break;
  2422.   
  2423. !       case 'p':
  2424. !            if (SecureMode || NoShellMode) {
  2425. !             CursesErrorMsg("Sorry, you are not allowed to print files");
  2426. !             touchwin(stdscr);
  2427. !             break;
  2428. !            }
  2429. !            if (!RCprintCommand(GlobalRC, GSgetLocalView(gs), 
  2430. !            GSgetLocalFile(gs), command) || 
  2431. !            !strncasecmp(command, "- none -", 8) || 
  2432. !            strlen(command) == 0) {
  2433. !             CursesErrorMsg("Sorry, no method to print this document");
  2434. !             touchwin(stdscr);
  2435. !             break;
  2436. !            }
  2437. !            Dialogmess[0] = strdup("The filename is:");
  2438. !            Dialogmess[1] = strdup(GSgetLocalFile(gs));
  2439. !            Dialogmess[2] = NULL;
  2440. !            if (CURDialog(cur, "Print current document", Dialogmess) != -1) {
  2441.   #ifdef VMS
  2442. !             if (!system(command))
  2443. ! #else
  2444. !             if (system(command))
  2445.   #endif
  2446. !             CursesErrorMsg("Encountered printing problem, sorry...");
  2447. !            }
  2448.   
  2449. !            free(Dialogmess[0]);
  2450. !            free(Dialogmess[1]);
  2451.   
  2452. +            touchwin(stdscr);
  2453. +            clearok(curscr, TRUE);
  2454.              break;
  2455.   
  2456.         case 's':
  2457. !            if (!(SecureMode || NoShellMode))
  2458.               Save_file(gs, NULL, GSgetLocalView(gs));
  2459.              else
  2460.               CursesErrorMsg("Sorry, you are not allowed to save files");
  2461.   
  2462. !            touchwin(stdscr);
  2463.              break;
  2464.   
  2465.         case 'D':
  2466. ***************
  2467. *** 438,443 ****
  2468. --- 471,477 ----
  2469.              /** Search ... ***/
  2470.              if (CURGetOneOption(CursesScreen, "",
  2471.                      "Search text for:", slashstring)<0) {
  2472. +             touchwin(stdscr);
  2473.               break;
  2474.              }
  2475.   
  2476. diff -c gopher+/gopherd/NeXTindex.c:3.7 gopher+/gopherd/NeXTindex.c:3.8
  2477. *** gopher+/gopherd/NeXTindex.c:3.7    Fri Nov  5 01:50:02 1993
  2478. --- gopher+/gopherd/NeXTindex.c    Fri Nov  5 01:50:02 1993
  2479. ***************
  2480. *** 1,7 ****
  2481.   /********************************************************************
  2482.    * lindner
  2483. !  * 3.7
  2484. !  * 1993/09/22 05:40:40
  2485.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/NeXTindex.c,v
  2486.    * Exp
  2487.    *
  2488. --- 1,7 ----
  2489.   /********************************************************************
  2490.    * lindner
  2491. !  * 3.8
  2492. !  * 1993/11/02 06:02:38
  2493.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/NeXTindex.c,v
  2494.    * Exp
  2495.    *
  2496. ***************
  2497. *** 15,20 ****
  2498. --- 15,23 ----
  2499.    *********************************************************************
  2500.    * Revision History:
  2501.    * NeXTindex.c,v
  2502. +  * Revision 3.8  1993/11/02  06:02:38  lindner
  2503. +  * HTML Mods
  2504. +  *
  2505.    * Revision 3.7  1993/09/22  05:40:40  lindner
  2506.    * Remove extra fixfile() call
  2507.    *
  2508. ***************
  2509. *** 158,164 ****
  2510.         if (plusdirs)
  2511.              GDplustoNet(gd, sockfd, NULL);
  2512.         else
  2513. !            GDtoNet(gd, sockfd);
  2514.   
  2515.        }
  2516.        else {
  2517. --- 161,167 ----
  2518.         if (plusdirs)
  2519.              GDplustoNet(gd, sockfd, NULL);
  2520.         else
  2521. !            GDtoNet(gd, sockfd, GSFORM_G0);
  2522.   
  2523.        }
  2524.        else {
  2525. diff -c gopher+/gopherd/Waisindex.c:3.11 gopher+/gopherd/Waisindex.c:3.12
  2526. *** gopher+/gopherd/Waisindex.c:3.11    Fri Nov  5 01:50:02 1993
  2527. --- gopher+/gopherd/Waisindex.c    Fri Nov  5 01:50:02 1993
  2528. ***************
  2529. *** 1,7 ****
  2530.   /********************************************************************
  2531.    * lindner
  2532. !  * 3.11
  2533. !  * 1993/09/30 16:56:49
  2534.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/Waisindex.c,v
  2535.    * Exp
  2536.    *
  2537. --- 1,7 ----
  2538.   /********************************************************************
  2539.    * lindner
  2540. !  * 3.12
  2541. !  * 1993/11/02 06:02:39
  2542.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/Waisindex.c,v
  2543.    * Exp
  2544.    *
  2545. ***************
  2546. *** 15,20 ****
  2547. --- 15,23 ----
  2548.    *********************************************************************
  2549.    * Revision History:
  2550.    * Waisindex.c,v
  2551. +  * Revision 3.12  1993/11/02  06:02:39  lindner
  2552. +  * HTML Mods
  2553. +  *
  2554.    * Revision 3.11  1993/09/30  16:56:49  lindner
  2555.    * Fix for WAIS and $ requests
  2556.    *
  2557. ***************
  2558. *** 397,403 ****
  2559.               if (plusdirs)
  2560.                GSplustoNet(gs, sockfd, NULL);
  2561.               else
  2562. !              GStoNet(gs,sockfd);
  2563.              }
  2564.              
  2565.              Debug("WaisIndexQuery ReturnLine=%s\r\n", ReturnLine);
  2566. --- 400,406 ----
  2567.               if (plusdirs)
  2568.                GSplustoNet(gs, sockfd, NULL);
  2569.               else
  2570. !              GStoNet(gs,sockfd, GSFORM_G0);
  2571.              }
  2572.              
  2573.              Debug("WaisIndexQuery ReturnLine=%s\r\n", ReturnLine);
  2574. diff -c gopher+/gopherd/authenticate.c:3.10 gopher+/gopherd/authenticate.c:3.11
  2575. *** gopher+/gopherd/authenticate.c:3.10    Fri Nov  5 01:50:03 1993
  2576. --- gopher+/gopherd/authenticate.c    Fri Nov  5 01:50:03 1993
  2577. ***************
  2578. *** 1,7 ****
  2579.   /********************************************************************
  2580.    * lindner
  2581. !  * 3.10
  2582. !  * 1993/09/18 03:28:05
  2583.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/authenticate.c,v
  2584.    * Exp
  2585.    *
  2586. --- 1,7 ----
  2587.   /********************************************************************
  2588.    * lindner
  2589. !  * 3.11
  2590. !  * 1993/11/02 05:55:48
  2591.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/authenticate.c,v
  2592.    * Exp
  2593.    *
  2594. ***************
  2595. *** 15,20 ****
  2596. --- 15,23 ----
  2597.    *********************************************************************
  2598.    * Revision History:
  2599.    * authenticate.c,v
  2600. +  * Revision 3.11  1993/11/02  05:55:48  lindner
  2601. +  * Fix for interactive unix
  2602. +  *
  2603.    * Revision 3.10  1993/09/18  03:28:05  lindner
  2604.    * Fix for Abort() fcn declaration
  2605.    *
  2606. ***************
  2607. *** 47,53 ****
  2608.   
  2609.   #include "String.h"
  2610.   #include <stdio.h>
  2611. - #include <sys/types.h>
  2612.   
  2613.   #include "gopherd.h"
  2614.   #include "tix.h"
  2615. --- 50,55 ----
  2616. diff -c gopher+/gopherd/command.c:3.8 gopher+/gopherd/command.c:3.9
  2617. *** gopher+/gopherd/command.c:3.8    Fri Nov  5 01:50:03 1993
  2618. --- gopher+/gopherd/command.c    Fri Nov  5 01:50:03 1993
  2619. ***************
  2620. *** 1,7 ****
  2621.   /********************************************************************
  2622.    * lindner
  2623. !  * 3.8
  2624. !  * 1993/10/04 06:49:20
  2625.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/command.c,v
  2626.    * Exp
  2627.    *
  2628. --- 1,7 ----
  2629.   /********************************************************************
  2630.    * lindner
  2631. !  * 3.9
  2632. !  * 1993/11/02 05:53:40
  2633.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/command.c,v
  2634.    * Exp
  2635.    *
  2636. ***************
  2637. *** 15,20 ****
  2638. --- 15,23 ----
  2639.    *********************************************************************
  2640.    * Revision History:
  2641.    * command.c,v
  2642. +  * Revision 3.9  1993/11/02  05:53:40  lindner
  2643. +  * more docs
  2644. +  *
  2645.    * Revision 3.8  1993/10/04  06:49:20  lindner
  2646.    * ASK data stored in core, for a while..
  2647.    *
  2648. ***************
  2649. *** 69,75 ****
  2650.        temp->ticket        = STRnew();
  2651.   
  2652.        CMDsetGplus(temp, FALSE);
  2653. !      
  2654.        return(temp);
  2655.   }
  2656.   
  2657. --- 72,78 ----
  2658.        temp->ticket        = STRnew();
  2659.   
  2660.        CMDsetGplus(temp, FALSE);
  2661.        return(temp);
  2662.   }
  2663.   
  2664. ***************
  2665. *** 164,170 ****
  2666.         CMDsetSearch(cmd, NULL);
  2667.        }
  2668.   
  2669. !      /** Get the extra data if it exists... **/
  2670.        if (field3 != NULL)
  2671.         extradata = field3;
  2672.        else if     (CMDgetSearch(cmd) == NULL && field2 != NULL)
  2673. --- 167,175 ----
  2674.         CMDsetSearch(cmd, NULL);
  2675.        }
  2676.   
  2677. !      /** Get the extra data (from an ask block etc.) if we've got
  2678. !           an extra data flag... **/
  2679.        if (field3 != NULL)
  2680.         extradata = field3;
  2681.        else if     (CMDgetSearch(cmd) == NULL && field2 != NULL)
  2682. ***************
  2683. *** 173,178 ****
  2684. --- 178,185 ----
  2685.        if (extradata != NULL) {
  2686.         CMDgetXtra(cmd, sockfd, atoi(extradata));
  2687.        }
  2688. +      /** Test to see if we've got Gplus behaviour */
  2689.   
  2690.        if (CMDgetCommand(cmd) != NULL && *CMDgetCommand(cmd) != '\0')
  2691.         CMDsetGplus(cmd, TRUE);
  2692. diff -c gopher+/gopherd/ext.c:3.11 gopher+/gopherd/ext.c:3.12
  2693. *** gopher+/gopherd/ext.c:3.11    Fri Nov  5 01:50:04 1993
  2694. --- gopher+/gopherd/ext.c    Fri Nov  5 01:50:04 1993
  2695. ***************
  2696. *** 1,7 ****
  2697.   /********************************************************************
  2698.    * lindner
  2699. !  * 3.11
  2700. !  * 1993/10/20 03:17:25
  2701.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/ext.c,v
  2702.    * Exp
  2703.    *
  2704. --- 1,7 ----
  2705.   /********************************************************************
  2706.    * lindner
  2707. !  * 3.12
  2708. !  * 1993/10/27 20:35:24
  2709.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/ext.c,v
  2710.    * Exp
  2711.    *
  2712. ***************
  2713. *** 15,20 ****
  2714. --- 15,23 ----
  2715.    *********************************************************************
  2716.    * Revision History:
  2717.    * ext.c,v
  2718. +  * Revision 3.12  1993/10/27  20:35:24  lindner
  2719. +  * Plug memory leak
  2720. +  *
  2721.    * Revision 3.11  1993/10/20  03:17:25  lindner
  2722.    * Fixed erratic problems with extension adding.  Note that the problems
  2723.    * with directories not working with Gopher0 clients is due to a missing
  2724. ***************
  2725. *** 195,201 ****
  2726.   
  2727.         if (x == 0) {
  2728.              /** Found an exact match **/
  2729. !            strcpy(cp, dp->d_name); 
  2730.              return(tmpfile);
  2731.         }
  2732.        }
  2733. --- 198,205 ----
  2734.   
  2735.         if (x == 0) {
  2736.              /** Found an exact match **/
  2737. !            strcpy(cp, dp->d_name);
  2738. !            closedir(ZeDir);
  2739.              return(tmpfile);
  2740.         }
  2741.        }
  2742. diff -c gopher+/gopherd/gopherd.c:3.58 gopher+/gopherd/gopherd.c:3.62
  2743. *** gopher+/gopherd/gopherd.c:3.58    Fri Nov  5 01:50:05 1993
  2744. --- gopher+/gopherd/gopherd.c    Fri Nov  5 01:50:05 1993
  2745. ***************
  2746. *** 1,7 ****
  2747.   /********************************************************************
  2748.    * lindner
  2749. !  * 3.58
  2750. !  * 1993/10/20 03:22:59
  2751.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherd.c,v
  2752.    * Exp
  2753.    *
  2754. --- 1,7 ----
  2755.   /********************************************************************
  2756.    * lindner
  2757. !  * 3.62
  2758. !  * 1993/11/03 03:35:25
  2759.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherd.c,v
  2760.    * Exp
  2761.    *
  2762. ***************
  2763. *** 15,20 ****
  2764. --- 15,32 ----
  2765.    *********************************************************************
  2766.    * Revision History:
  2767.    * gopherd.c,v
  2768. +  * Revision 3.62  1993/11/03  03:35:25  lindner
  2769. +  * Add headlines to the top level HTML page
  2770. +  *
  2771. +  * Revision 3.61  1993/11/02  06:08:11  lindner
  2772. +  * Strip extensions off of files with multiple views
  2773. +  *
  2774. +  * Revision 3.60  1993/11/02  05:58:12  lindner
  2775. +  * WAIS index speedups, mondo HTML mods
  2776. +  *
  2777. +  * Revision 3.59  1993/10/28  22:08:17  lindner
  2778. +  * memory leak fixes, fix for -u problem
  2779. +  *
  2780.    * Revision 3.58  1993/10/20  03:22:59  lindner
  2781.    * none
  2782.    *
  2783. ***************
  2784. *** 479,486 ****
  2785.                     optarg);
  2786.                errflag++;
  2787.               } else {
  2788. -              struct passwd *pw;
  2789.                if (getuid() != 0)
  2790.                     printf("Need to be root to use -u\n"), exit(-1);
  2791.                
  2792. --- 491,496 ----
  2793. ***************
  2794. *** 955,965 ****
  2795.        if (!view && strlen(CMDgetSelstr(cmd)) == 0) 
  2796.         view = "application/gopher-menu";
  2797.   
  2798. !      /*** Try to speed things up for gopher0 requests.. ***/
  2799.        if (!view && CMDisGplus(cmd) == FALSE) {
  2800.         struct stat statbuf;
  2801.         ;
  2802. !       if (*CMDgetSelstr(cmd) == '0')
  2803.              if (!rstat(CMDgetFile(cmd), &statbuf))
  2804.               view = "text/plain";
  2805.         else if (*CMDgetSelstr(cmd) == '1')
  2806. --- 965,987 ----
  2807.        if (!view && strlen(CMDgetSelstr(cmd)) == 0) 
  2808.         view = "application/gopher-menu";
  2809.   
  2810. !      /*** If the selector string begins with h, it's a html version of
  2811. !           a gopher directory ***/
  2812. !      if (!view && *CMDgetSelstr(cmd) == 'h') {
  2813. !       *CMDgetSelstr(cmd) = '1';
  2814. !       view = "text/html";
  2815. !      }
  2816. !      /*** Try to speed things up for gopher0 requests, avoid reading
  2817. !           big directories.. ***/
  2818.        if (!view && CMDisGplus(cmd) == FALSE) {
  2819.         struct stat statbuf;
  2820.         ;
  2821. !       if (*CMDgetSelstr(cmd) == '0' ||
  2822. !           *CMDgetSelstr(cmd) == 'R')
  2823.              if (!rstat(CMDgetFile(cmd), &statbuf))
  2824.               view = "text/plain";
  2825.         else if (*CMDgetSelstr(cmd) == '1')
  2826. ***************
  2827. *** 1016,1021 ****
  2828. --- 1038,1044 ----
  2829.               }
  2830.               /** We should have a view by now **/
  2831.              }
  2832. +            GDdestroy(gd);
  2833.         }
  2834.        }
  2835.   
  2836. ***************
  2837. *** 1049,1057 ****
  2838.         break;
  2839.   
  2840.        case 'h':
  2841. !       /*** A raw html file ***/
  2842. !       /*** Turn off html'ing and just dump the file ***/
  2843. !       UsingHTML = FALSE;
  2844.   
  2845.        case '0':
  2846.        case '9':
  2847. --- 1072,1080 ----
  2848.         break;
  2849.   
  2850.        case 'h':
  2851. !       /** It might be a directory..., or an HTML file on disk **/
  2852. !       ;
  2853. !       break;
  2854.   
  2855.        case '0':
  2856.        case '9':
  2857. ***************
  2858. *** 1277,1282 ****
  2859. --- 1300,1308 ----
  2860.         }
  2861.        }
  2862.   
  2863. +      /** Free data ***/
  2864. +      CMDdestroy(cmd);
  2865.        return(0);
  2866.   }
  2867.   
  2868. ***************
  2869. *** 1307,1312 ****
  2870. --- 1333,1339 ----
  2871.         *Selstr = '1';
  2872.         strcpy(Selstr +1, newpath);
  2873.         GSsetPath(gs, Selstr);
  2874. +       GSsetTTL(gs, GDCgetCachetime(Config));
  2875.         return;
  2876.        default:
  2877.   
  2878. ***************
  2879. *** 1391,1396 ****
  2880. --- 1418,1424 ----
  2881.        case A_DIRECTORY:
  2882.         GSaddView(gs, "application/gopher-menu", lang, size);
  2883.         GSaddView(gs, "application/gopher+-menu", lang, size);
  2884. +       GSaddView(gs, "text/html", lang, size);
  2885.         break;
  2886.        case A_MACHEX:
  2887.         GSaddView(gs, "application/mac-binhex40", lang, size);
  2888. ***************
  2889. *** 1418,1424 ****
  2890.         GSaddView(gs, "image/gif", lang, size);
  2891.         break;    
  2892.        case A_HTML:
  2893. !       GSaddView(gs, "application/HTML", lang, size);
  2894.         break;
  2895.        case A_TN3270:
  2896.         GSaddView(gs, "application/tn3270", lang, 0);
  2897. --- 1446,1452 ----
  2898.         GSaddView(gs, "image/gif", lang, size);
  2899.         break;    
  2900.        case A_HTML:
  2901. !       GSaddView(gs, "text/html", lang, size);
  2902.         break;
  2903.        case A_TN3270:
  2904.         GSaddView(gs, "application/tn3270", lang, 0);
  2905. ***************
  2906. *** 1530,1536 ****
  2907.        StrArray           *Linkfiles;
  2908.        int                i, cachefd;
  2909.   
  2910. -      Linkfiles = STAnew(10);
  2911.   
  2912.        Debug("GDfromUFS:%s\r\n",pathname)
  2913.        Debug("GDfromUFS:Config=%d\r\n",Config)
  2914. --- 1558,1563 ----
  2915. ***************
  2916. *** 1566,1580 ****
  2917.       chroot()ing and using relative paths */
  2918.        if ((ZeDir = uopendir(".")) == NULL) {
  2919.         char tmpstr[256];
  2920. !       getwd(tmpstr);
  2921. !       printf("Current Dir is %s\n", tmpstr);
  2922. !       fflush(stdout);
  2923. !       perror("SOL dude");
  2924.         sprintf(tmpstr, "Cannot access directory '%s'", pathname);
  2925.         Abortoutput(sockfd, tmpstr);
  2926.         return(NULL);
  2927.        }
  2928.   
  2929.        for (dp = readdir(ZeDir); dp != NULL; dp = readdir(ZeDir)) {
  2930.   #ifdef CAPFILES
  2931.         char capfile[MAXPATHLEN];
  2932. --- 1593,1606 ----
  2933.       chroot()ing and using relative paths */
  2934.        if ((ZeDir = uopendir(".")) == NULL) {
  2935.         char tmpstr[256];
  2936.         sprintf(tmpstr, "Cannot access directory '%s'", pathname);
  2937.         Abortoutput(sockfd, tmpstr);
  2938.         return(NULL);
  2939.        }
  2940.   
  2941. +      Linkfiles = STAnew(10);
  2942.        for (dp = readdir(ZeDir); dp != NULL; dp = readdir(ZeDir)) {
  2943.   #ifdef CAPFILES
  2944.         char capfile[MAXPATHLEN];
  2945. ***************
  2946. *** 1688,1693 ****
  2947. --- 1714,1720 ----
  2948.              Pathp[strlen(Prefix)+strlen(newpath)-strlen(EXgetExt(ext))]= '\0';
  2949.              GSsetPath(gs, Pathp);
  2950.              GSsetType(gs, EXgetObjtype(ext));
  2951.              /*** Strip extension off of title***/
  2952.              filename[strlen(filename)-strlen(EXgetExt(ext))]= '\0';
  2953.              
  2954. ***************
  2955. *** 1701,1706 ****
  2956. --- 1728,1734 ----
  2957.               }
  2958.               gs = GDgetEntry(gd, num);
  2959.               AddItem = FALSE;
  2960. +             GSsetTitle(gs, filename);
  2961.              } 
  2962.   
  2963.              /** Oh say can we hack, by the dawns early day :-) **/
  2964. ***************
  2965. *** 1794,1799 ****
  2966. --- 1822,1828 ----
  2967.        closedir(ZeDir);
  2968.        
  2969.        GDsort(gd);
  2970. +      STAdestroy(Linkfiles);
  2971.        
  2972.        return(gd);
  2973.        
  2974. ***************
  2975. *** 1866,1872 ****
  2976.   
  2977.         GSsendHeader(sockfd, -1);
  2978.         writestring(sockfd, "+INFO ");
  2979. !       GStoNet(gs,sockfd);
  2980.         sprintf(tmpstr, "+ADMIN:\r\n Admin: %s <%s>\r\n", GDCgetAdmin(Config),
  2981.             GDCgetAdminEmail(Config));
  2982.         writestring(sockfd, tmpstr);
  2983. --- 1895,1901 ----
  2984.   
  2985.         GSsendHeader(sockfd, -1);
  2986.         writestring(sockfd, "+INFO ");
  2987. !       GStoNet(gs,sockfd, GSFORM_G0);
  2988.         sprintf(tmpstr, "+ADMIN:\r\n Admin: %s <%s>\r\n", GDCgetAdmin(Config),
  2989.             GDCgetAdminEmail(Config));
  2990.         writestring(sockfd, tmpstr);
  2991. ***************
  2992. *** 1912,1917 ****
  2993. --- 1941,1951 ----
  2994.         break;
  2995.   
  2996.        }
  2997. +      if (gs)
  2998. +       GSdestroy(gs);
  2999. +      if (gd)
  3000. +       GDdestroy(gd);
  3001.        writestring(sockfd, ".\r\n");
  3002.   }
  3003.        
  3004. ***************
  3005. *** 1936,1941 ****
  3006. --- 1970,1976 ----
  3007.   {
  3008.        GopherDirObj *gd;
  3009.        boolean      attrlist = FALSE;
  3010. +      boolean      HTMLit   = FALSE;
  3011.        boolean      Recurse  = FALSE;
  3012.        char         *filtereddata[16], **filtered=filtereddata;
  3013.        int          i=0;
  3014. ***************
  3015. *** 1963,1971 ****
  3016.        if (view != NULL) {
  3017.         if (strncmp(view, "application/gopher+-menu",24) == 0)
  3018.              attrlist = TRUE;
  3019. !       if (strncmp(view, "Directory+/recursive", 20)==0)
  3020.              Recurse = TRUE;
  3021. !       if (strncmp(view, "Directory/recursive", 19)==0)
  3022.              Recurse = TRUE;
  3023.        }
  3024.        if (Recurse)
  3025. --- 1998,2010 ----
  3026.        if (view != NULL) {
  3027.         if (strncmp(view, "application/gopher+-menu",24) == 0)
  3028.              attrlist = TRUE;
  3029. !       else if (strncmp(view, "text/html", 9) == 0) {
  3030. !            attrlist = TRUE;
  3031. !            HTMLit   = TRUE;
  3032. !       }
  3033. !       else if (strncmp(view, "Directory+/recursive", 20)==0)
  3034.              Recurse = TRUE;
  3035. !       else if (strncmp(view, "Directory/recursive", 19)==0)
  3036.              Recurse = TRUE;
  3037.        }
  3038.        if (Recurse)
  3039. ***************
  3040. *** 2005,2011 ****
  3041.         }
  3042.   
  3043.   
  3044. !       if (GDCgetCaching(Config)) {
  3045.   
  3046.              if (!attrlist && 
  3047.              Cachetimedout(".cache", GDCgetCachetime(Config),
  3048. --- 2044,2050 ----
  3049.         }
  3050.   
  3051.   
  3052. !       if (GDCgetCaching(Config) && !HTMLit) {
  3053.   
  3054.              if (!attrlist && 
  3055.              Cachetimedout(".cache", GDCgetCachetime(Config),
  3056. ***************
  3057. *** 2039,2049 ****
  3058.         }
  3059.         
  3060.         rchdir("/");
  3061. !       
  3062. !       if (attrlist)
  3063.              GDplustoNet(gd, sockfd,filtered);
  3064.         else
  3065. !            GDtoNet(gd, sockfd);
  3066.   
  3067.   
  3068.         /*
  3069. --- 2078,2098 ----
  3070.         }
  3071.         
  3072.         rchdir("/");
  3073. !       if (HTMLit) {
  3074. !            if (strcmp(pathname, "/") == 0) {
  3075. !             writestring(sockfd, "<H1>");
  3076. !             writestring(sockfd, GDCgetSite(Config));
  3077. !             writestring(sockfd, "</H1>\r\n<H2>");
  3078. !             writestring(sockfd, GDCgetOrg(Config));
  3079. !             writestring(sockfd, "</H2>");
  3080. !            }
  3081. !            GDtoNet(gd, sockfd, GSFORM_HTML);
  3082. !       }
  3083. !       else if (attrlist)
  3084.              GDplustoNet(gd, sockfd,filtered);
  3085.         else
  3086. !            GDtoNet(gd, sockfd, GSFORM_G0);
  3087.   
  3088.   
  3089.         /*
  3090. ***************
  3091. *** 2060,2066 ****
  3092.              
  3093.              if (cachefd >= 0) {
  3094.               Debug("Caching directory... into %s\n",cachefile);
  3095. !             GDtoNet(gd, cachefd);
  3096.               close(cachefd);
  3097.              }
  3098.              
  3099. --- 2109,2115 ----
  3100.              
  3101.              if (cachefd >= 0) {
  3102.               Debug("Caching directory... into %s\n",cachefile);
  3103. !             GDtoNet(gd, cachefd, GSFORM_G0);
  3104.               close(cachefd);
  3105.              }
  3106.              
  3107. ***************
  3108. *** 2108,2113 ****
  3109. --- 2157,2164 ----
  3110.        } while (Recurse);
  3111.   
  3112.        writestring(sockfd, ".\r\n");
  3113. +      GDdestroy(gd);
  3114. +      STRdestroy(pushstring);
  3115.   
  3116.   }
  3117.   
  3118. diff -c gopher+/gopherd/gopherd.conf:3.15 gopher+/gopherd/gopherd.conf:3.16
  3119. *** gopher+/gopherd/gopherd.conf:3.15    Fri Nov  5 01:50:08 1993
  3120. --- gopher+/gopherd/gopherd.conf    Fri Nov  5 01:50:08 1993
  3121. ***************
  3122. *** 1,5 ****
  3123.   #
  3124. ! # gopherd.conf,v 3.15 1993/10/20 03:22:52 lindner Exp
  3125.   #
  3126.   
  3127.   #
  3128. --- 1,5 ----
  3129.   #
  3130. ! # gopherd.conf,v 3.16 1993/11/02 06:03:32 lindner Exp
  3131.   #
  3132.   
  3133.   #
  3134. ***************
  3135. *** 105,112 ****
  3136.   #
  3137.   # Movies
  3138.   #
  3139. ! viewext: .mov 9 9 video/quicktime
  3140. ! viewext: .mpg 9 9 video/mpeg
  3141.   
  3142.   #
  3143.   # Binary files, these need changing for the encoding method
  3144. --- 105,112 ----
  3145.   #
  3146.   # Movies
  3147.   #
  3148. ! viewext: .mov ; 9 video/quicktime
  3149. ! viewext: .mpg ; 9 video/mpeg
  3150.   
  3151.   #
  3152.   # Binary files, these need changing for the encoding method
  3153. diff -c gopher+/gopherd/gopherdconf.c:3.13 gopher+/gopherd/gopherdconf.c:3.14
  3154. *** gopher+/gopherd/gopherdconf.c:3.13    Fri Nov  5 01:50:08 1993
  3155. --- gopher+/gopherd/gopherdconf.c    Fri Nov  5 01:50:09 1993
  3156. ***************
  3157. *** 1,7 ****
  3158.   /********************************************************************
  3159.    * lindner
  3160. !  * 3.13
  3161. !  * 1993/10/20 03:18:17
  3162.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherdconf.c,v
  3163.    * Exp
  3164.    *
  3165. --- 1,7 ----
  3166.   /********************************************************************
  3167.    * lindner
  3168. !  * 3.14
  3169. !  * 1993/10/27 20:36:59
  3170.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherdconf.c,v
  3171.    * Exp
  3172.    *
  3173. ***************
  3174. *** 15,20 ****
  3175. --- 15,23 ----
  3176.    *********************************************************************
  3177.    * Revision History:
  3178.    * gopherdconf.c,v
  3179. +  * Revision 3.14  1993/10/27  20:36:59  lindner
  3180. +  * Plug memory leak
  3181. +  *
  3182.    * Revision 3.13  1993/10/20  03:18:17  lindner
  3183.    * Code for ignore_patt:
  3184.    *
  3185. ***************
  3186. *** 498,505 ****
  3187.         *extin = ext;
  3188.         return(TRUE);
  3189.        }
  3190. !      else
  3191.         return(FALSE);
  3192.   
  3193.   }
  3194.   
  3195. --- 501,510 ----
  3196.         *extin = ext;
  3197.         return(TRUE);
  3198.        }
  3199. !      else {
  3200. !       EXdestroy(ext);
  3201.         return(FALSE);
  3202. +      }
  3203.   
  3204.   }
  3205.   
  3206. diff -c gopher+/gopherd/index.c:3.14 gopher+/gopherd/index.c:3.15
  3207. *** gopher+/gopherd/index.c:3.14    Fri Nov  5 01:50:09 1993
  3208. --- gopher+/gopherd/index.c    Fri Nov  5 01:50:09 1993
  3209. ***************
  3210. *** 1,7 ****
  3211.   /********************************************************************
  3212.    * lindner
  3213. !  * 3.14
  3214. !  * 1993/09/30 16:57:05
  3215.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/index.c,v
  3216.    * Exp
  3217.    *
  3218. --- 1,7 ----
  3219.   /********************************************************************
  3220.    * lindner
  3221. !  * 3.15
  3222. !  * 1993/11/02 06:01:43
  3223.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/index.c,v
  3224.    * Exp
  3225.    *
  3226. ***************
  3227. *** 15,20 ****
  3228. --- 15,23 ----
  3229.    *********************************************************************
  3230.    * Revision History:
  3231.    * index.c,v
  3232. +  * Revision 3.15  1993/11/02  06:01:43  lindner
  3233. +  * HTML mods
  3234. +  *
  3235.    * Revision 3.14  1993/09/30  16:57:05  lindner
  3236.    * Fix for WAIS and $ requests
  3237.    *
  3238. ***************
  3239. *** 352,358 ****
  3240.        if (UsingHTML)
  3241.         GDtoNetHTML(gd, sockfd);
  3242.        else {
  3243. !       GDtoNet(gd, sockfd);
  3244.        }
  3245.   
  3246.        pclose(moocow);
  3247. --- 355,361 ----
  3248.        if (UsingHTML)
  3249.         GDtoNetHTML(gd, sockfd);
  3250.        else {
  3251. !       GDtoNet(gd, sockfd, GSFORM_G0);
  3252.        }
  3253.   
  3254.        pclose(moocow);
  3255. ***************
  3256. *** 391,397 ****
  3257.        if (UsingHTML)
  3258.         GDtoNetHTML(gd, sockfd);
  3259.        else {
  3260. !       GDtoNet(gd, sockfd);
  3261.        }
  3262.   
  3263.        pclose(Searchprocess);
  3264. --- 394,400 ----
  3265.        if (UsingHTML)
  3266.         GDtoNetHTML(gd, sockfd);
  3267.        else {
  3268. !       GDtoNet(gd, sockfd, GSFORM_G0);
  3269.        }
  3270.   
  3271.        pclose(Searchprocess);
  3272. diff -c gopher+/gopherd/serverutil.c:3.17 gopher+/gopherd/serverutil.c:3.18
  3273. *** gopher+/gopherd/serverutil.c:3.17    Fri Nov  5 01:50:10 1993
  3274. --- gopher+/gopherd/serverutil.c    Fri Nov  5 01:50:10 1993
  3275. ***************
  3276. *** 1,7 ****
  3277.   /********************************************************************
  3278.    * lindner
  3279. !  * 3.17
  3280. !  * 1993/10/11 04:40:54
  3281.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v
  3282.    * Exp
  3283.    *
  3284. --- 1,7 ----
  3285.   /********************************************************************
  3286.    * lindner
  3287. !  * 3.18
  3288. !  * 1993/11/05 07:25:44
  3289.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v
  3290.    * Exp
  3291.    *
  3292. ***************
  3293. *** 15,20 ****
  3294. --- 15,23 ----
  3295.    *********************************************************************
  3296.    * Revision History:
  3297.    * serverutil.c,v
  3298. +  * Revision 3.18  1993/11/05  07:25:44  lindner
  3299. +  * futzing with stdarg lines
  3300. +  *
  3301.    * Revision 3.17  1993/10/11  04:40:54  lindner
  3302.    * Changes to allow logging via daemon.info syslogd facility
  3303.    *
  3304. ***************
  3305. *** 81,97 ****
  3306.   #include "serverutil.h"
  3307.   #include "Debug.h"
  3308.   
  3309. - #ifdef __STDC__
  3310. - #include <stdarg.h>
  3311. - #else
  3312. - #include <varargs.h>
  3313. - #endif
  3314.   #ifndef NOSYSLOG
  3315.   #include <syslog.h>
  3316.   #else
  3317.   #define syslog(a,b)    fprintf(stderr, "%s\n", (b))
  3318.   #define openlog(a,b,c)    fprintf(stderr, "%s\n", (a))
  3319.   #endif
  3320.   
  3321.   /*
  3322. --- 84,101 ----
  3323.   #include "serverutil.h"
  3324.   #include "Debug.h"
  3325.   
  3326.   #ifndef NOSYSLOG
  3327.   #include <syslog.h>
  3328.   #else
  3329.   #define syslog(a,b)    fprintf(stderr, "%s\n", (b))
  3330.   #define openlog(a,b,c)    fprintf(stderr, "%s\n", (a))
  3331. + #endif
  3332. + #ifdef __STDC__
  3333. + #include <stdarg.h>
  3334. + #else
  3335. + #include <varargs.h>
  3336.   #endif
  3337.   
  3338.   /*
  3339. diff -c gopher+/gopherd/special.c:3.14 gopher+/gopherd/special.c:3.15
  3340. *** gopher+/gopherd/special.c:3.14    Fri Nov  5 01:50:10 1993
  3341. --- gopher+/gopherd/special.c    Fri Nov  5 01:50:10 1993
  3342. ***************
  3343. *** 1,7 ****
  3344.   /********************************************************************
  3345.    * lindner
  3346. !  * 3.14
  3347. !  * 1993/08/19 20:52:30
  3348.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/special.c,v
  3349.    * Exp
  3350.    *
  3351. --- 1,7 ----
  3352.   /********************************************************************
  3353.    * lindner
  3354. !  * 3.15
  3355. !  * 1993/11/03 03:32:52
  3356.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/special.c,v
  3357.    * Exp
  3358.    *
  3359. ***************
  3360. *** 15,20 ****
  3361. --- 15,23 ----
  3362.    *********************************************************************
  3363.    * Revision History:
  3364.    * special.c,v
  3365. +  * Revision 3.15  1993/11/03  03:32:52  lindner
  3366. +  * Test shell scripts for exec bit
  3367. +  *
  3368.    * Revision 3.14  1993/08/19  20:52:30  lindner
  3369.    * Mitra comments
  3370.    *
  3371. ***************
  3372. *** 137,143 ****
  3373.        }
  3374.   
  3375.        /* Script? */
  3376. !      if (isshellscript(s)) {
  3377.         s[strlen(s)-1] = '\0';
  3378.         if (dochroot)
  3379.              sprintf(buf, "\"%s\" %s", pathname, (EXECargs == NULL) ? "" : EXECargs);
  3380. --- 140,146 ----
  3381.        }
  3382.   
  3383.        /* Script? */
  3384. !      if (isshellscript(s) && isexec(fileno(fp))) {
  3385.         s[strlen(s)-1] = '\0';
  3386.         if (dochroot)
  3387.              sprintf(buf, "\"%s\" %s", pathname, (EXECargs == NULL) ? "" : EXECargs);
  3388. ***************
  3389. *** 205,215 ****
  3390.        return(NULL);
  3391.   }
  3392.   
  3393.   int
  3394.   isshellscript(s)
  3395.     char *s;
  3396.   {
  3397. !      if (! strncmp(s, "#!/", 3))
  3398.         return 1;
  3399.        else
  3400.         return 0;
  3401. --- 208,242 ----
  3402.        return(NULL);
  3403.   }
  3404.   
  3405. + /*
  3406. +  * Is this a shell script?
  3407. +  */
  3408.   int
  3409.   isshellscript(s)
  3410.     char *s;
  3411.   {
  3412. !      if (! strncmp(s, "#!", 2))
  3413. !       return 1;
  3414. !      else
  3415. !       return 0;
  3416. ! }
  3417. ! /*
  3418. !  * Are the exec bits set?
  3419. !  */
  3420. ! int
  3421. ! isexec(fd)
  3422. !   int fd;
  3423. ! {
  3424. !      STATSTR sb;
  3425. !      
  3426. !      if (fstat(fd, &sb) == -1)
  3427. !       return 0;
  3428. !      
  3429. !      if (sb.st_mode & S_IXUSR)
  3430.         return 1;
  3431.        else
  3432.         return 0;
  3433. diff -c gopher+/gopherd/waisgopher.c:3.14 gopher+/gopherd/waisgopher.c:3.15
  3434. *** gopher+/gopherd/waisgopher.c:3.14    Fri Nov  5 01:50:11 1993
  3435. --- gopher+/gopherd/waisgopher.c    Fri Nov  5 01:50:11 1993
  3436. ***************
  3437. *** 1,7 ****
  3438.   /********************************************************************
  3439.    * lindner
  3440. !  * 3.14
  3441. !  * 1993/10/04 06:40:19
  3442.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/waisgopher.c,v
  3443.    * Exp
  3444.    *
  3445. --- 1,7 ----
  3446.   /********************************************************************
  3447.    * lindner
  3448. !  * 3.15
  3449. !  * 1993/11/02 06:02:41
  3450.    * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/waisgopher.c,v
  3451.    * Exp
  3452.    *
  3453. ***************
  3454. *** 15,20 ****
  3455. --- 15,23 ----
  3456.    *********************************************************************
  3457.    * Revision History:
  3458.    * waisgopher.c,v
  3459. +  * Revision 3.15  1993/11/02  06:02:41  lindner
  3460. +  * HTML Mods
  3461. +  *
  3462.    * Revision 3.14  1993/10/04  06:40:19  lindner
  3463.    * casting error
  3464.    *
  3465. ***************
  3466. *** 521,527 ****
  3467.              }
  3468.              
  3469.              if (view == NULL)
  3470. !             GDtoNet(gd, sockfd);
  3471.              else {
  3472.               if (isgplus)
  3473.                GSsendHeader(sockfd, -1);
  3474. --- 524,530 ----
  3475.              }
  3476.              
  3477.              if (view == NULL)
  3478. !             GDtoNet(gd, sockfd, GSFORM_G0);
  3479.              else {
  3480.               if (isgplus)
  3481.                GSsendHeader(sockfd, -1);
  3482. ***************
  3483. *** 529,535 ****
  3484.               if (strcasecmp(view, "application/gopher+-menu")==0)
  3485.                GDplustoNet(gd, sockfd, NULL);
  3486.               else
  3487. !              GDtoNet(gd, sockfd);
  3488.              }
  3489.   
  3490.              writestring(sockfd, ".\r\n");
  3491. --- 532,538 ----
  3492.               if (strcasecmp(view, "application/gopher+-menu")==0)
  3493.                GDplustoNet(gd, sockfd, NULL);
  3494.               else
  3495. !              GDtoNet(gd, sockfd, GSFORM_G0);
  3496.              }
  3497.   
  3498.              writestring(sockfd, ".\r\n");
  3499. diff -c gopher+/gophfilt/gophfilt.c:1.1 gopher+/gophfilt/gophfilt.c:1.2
  3500. *** gopher+/gophfilt/gophfilt.c:1.1    Fri Nov  5 01:50:13 1993
  3501. --- gopher+/gophfilt/gophfilt.c    Fri Nov  5 01:50:13 1993
  3502. ***************
  3503. *** 9,15 ****
  3504.    */
  3505.   
  3506.   #include <stdio.h>
  3507. ! #include <stdlib.h>
  3508.   #include <signal.h>
  3509.   #include "GSgopherobj.h"
  3510.   #include "conf.h"
  3511. --- 9,15 ----
  3512.    */
  3513.   
  3514.   #include <stdio.h>
  3515. ! #include "Stdlib.h"
  3516.   #include <signal.h>
  3517.   #include "GSgopherobj.h"
  3518.   #include "conf.h"
  3519. ***************
  3520. *** 18,24 ****
  3521.   
  3522.   int DEBUG = 0;
  3523.   
  3524. ! void *timeout();
  3525.   
  3526.   /*** for getopt processing ***/
  3527.   extern char *optarg;
  3528. --- 18,24 ----
  3529.   
  3530.   int DEBUG = 0;
  3531.   
  3532. ! SIGRETTYPE timeout();
  3533.   
  3534.   /*** for getopt processing ***/
  3535.   extern char *optarg;
  3536. ***************
  3537. *** 135,141 ****
  3538.   
  3539.        /* Set an alarm in case we get nothing */
  3540.   
  3541. !      (void *)signal(SIGALRM, timeout);
  3542.        (void)alarm(timer);
  3543.         
  3544.        switch (GSgetType(Oneshot)) {
  3545. --- 135,141 ----
  3546.   
  3547.        /* Set an alarm in case we get nothing */
  3548.   
  3549. !      (void)signal(SIGALRM, timeout);
  3550.        (void)alarm(timer);
  3551.         
  3552.        switch (GSgetType(Oneshot)) {
  3553. ***************
  3554. *** 180,186 ****
  3555.   /*SUBTTL timeout() - Alarm expired while awaiting data */
  3556.   /*
  3557.    */
  3558. ! void *timeout()
  3559.   {
  3560.     exit(-7);
  3561.   }
  3562. --- 180,186 ----
  3563.   /*SUBTTL timeout() - Alarm expired while awaiting data */
  3564.   /*
  3565.    */
  3566. ! SIGRETTYPE timeout()
  3567.   {
  3568.     exit(-7);
  3569.   }
  3570. diff -c gopher+/object/BLblock.c:3.7 gopher+/object/BLblock.c:3.8
  3571. *** gopher+/object/BLblock.c:3.7    Fri Nov  5 01:50:15 1993
  3572. --- gopher+/object/BLblock.c    Fri Nov  5 01:50:15 1993
  3573. ***************
  3574. *** 1,7 ****
  3575.   /********************************************************************
  3576.    * lindner
  3577. !  * 3.7
  3578. !  * 1993/07/29 19:59:23
  3579.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/BLblock.c,v
  3580.    * Exp
  3581.    *
  3582. --- 1,7 ----
  3583.   /********************************************************************
  3584.    * lindner
  3585. !  * 3.8
  3586. !  * 1993/11/02 06:13:36
  3587.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/BLblock.c,v
  3588.    * Exp
  3589.    *
  3590. ***************
  3591. *** 15,20 ****
  3592. --- 15,23 ----
  3593.    *********************************************************************
  3594.    * Revision History:
  3595.    * BLblock.c,v
  3596. +  * Revision 3.8  1993/11/02  06:13:36  lindner
  3597. +  * Fix for HTML mods
  3598. +  *
  3599.    * Revision 3.7  1993/07/29  19:59:23  lindner
  3600.    * Removed extraneous variables
  3601.    *
  3602. ***************
  3603. *** 295,301 ****
  3604.   
  3605.        case BDATA_GREF:
  3606.         writestring(fd, " ");
  3607. !       GStoNet(bl->data.gs,fd);
  3608.         break;
  3609.   
  3610.        case BDATA_TEXT:
  3611. --- 298,304 ----
  3612.   
  3613.        case BDATA_GREF:
  3614.         writestring(fd, " ");
  3615. !       GStoNet(bl->data.gs,fd, GSFORM_G0);
  3616.         break;
  3617.   
  3618.        case BDATA_TEXT:
  3619. diff -c gopher+/object/GDgopherdir.c:3.13 gopher+/object/GDgopherdir.c:3.14
  3620. *** gopher+/object/GDgopherdir.c:3.13    Fri Nov  5 01:50:15 1993
  3621. --- gopher+/object/GDgopherdir.c    Fri Nov  5 01:50:15 1993
  3622. ***************
  3623. *** 1,7 ****
  3624.   /********************************************************************
  3625.    * lindner
  3626. !  * 3.13
  3627. !  * 1993/08/23 20:56:34
  3628.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/GDgopherdir.c,v
  3629.    * Exp
  3630.    *
  3631. --- 1,7 ----
  3632.   /********************************************************************
  3633.    * lindner
  3634. !  * 3.14
  3635. !  * 1993/11/02 06:15:15
  3636.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/GDgopherdir.c,v
  3637.    * Exp
  3638.    *
  3639. ***************
  3640. *** 15,20 ****
  3641. --- 15,23 ----
  3642.    *********************************************************************
  3643.    * Revision History:
  3644.    * GDgopherdir.c,v
  3645. +  * Revision 3.14  1993/11/02  06:15:15  lindner
  3646. +  * HTML additions
  3647. +  *
  3648.    * Revision 3.13  1993/08/23  20:56:34  lindner
  3649.    * Fix for empty directory in g+ client
  3650.    *
  3651. ***************
  3652. *** 212,227 ****
  3653.   
  3654.   
  3655.   void
  3656. ! GDtoNet(gd, sockfd)
  3657.     GopherDirObj *gd;
  3658.     int sockfd;
  3659.   {
  3660.        int i;
  3661.        Debug("GDplustoNet\n",0);
  3662.        for (i=0; i< GDgetNumitems(gd); i++) {
  3663. !       GStoNet(GDgetEntry(gd, i), sockfd);
  3664.        }      
  3665.   
  3666.   }
  3667.   
  3668.   
  3669. --- 215,239 ----
  3670.   
  3671.   
  3672.   void
  3673. ! GDtoNet(gd, sockfd, fmt)
  3674.     GopherDirObj *gd;
  3675.     int sockfd;
  3676. +   GSformat fmt;
  3677.   {
  3678.        int i;
  3679.        Debug("GDplustoNet\n",0);
  3680. +      if (fmt == GSFORM_HTML) {
  3681. +       writestring(sockfd, "<DL COMPACT>\r\n");
  3682. +      }
  3683.        for (i=0; i< GDgetNumitems(gd); i++) {
  3684. !       GStoNet(GDgetEntry(gd, i), sockfd,fmt);
  3685.        }      
  3686.   
  3687. +      if (fmt == GSFORM_HTML) {
  3688. +       writestring(sockfd, "</DL>\r\n");
  3689. +      }
  3690.   }
  3691.   
  3692.   
  3693. ***************
  3694. *** 418,423 ****
  3695. --- 430,436 ----
  3696.   
  3697.         if (result == HARDERROR)
  3698.              break;
  3699.         if (result == SOFTERROR)
  3700.              continue;
  3701.   
  3702. ***************
  3703. *** 450,457 ****
  3704.   }
  3705.   
  3706.   /***  Search for a specific gopher item ***/
  3707. - /* Allow text to end in .Z - gd will never have a .Z item in it due to fix 
  3708. -    in gopherd/gopherd */
  3709.   int
  3710.   GDSearch(gd, text)
  3711.     GopherDirObj *gd;
  3712. --- 463,468 ----
  3713. ***************
  3714. *** 458,464 ****
  3715.     char         *text;     /* Note first char is G0 type and is ignored*/
  3716.   {
  3717.        int i;
  3718. -      int WasCtrlZ = 0;
  3719.        GopherObj *gs;
  3720.        int len;
  3721.   
  3722. --- 469,474 ----
  3723. ***************
  3724. *** 471,494 ****
  3725.         return(-1);
  3726.   
  3727.        len = strlen(text);
  3728. -      if (len >2) {
  3729. -       WasCtrlZ = (strcmp(text+strlen(text)-2,".Z")  == 0);
  3730. -       if (WasCtrlZ) 
  3731. -            text[strlen(text)-2] = '\0';
  3732. -      }
  3733.       
  3734.        for (i=0; i< GDgetNumitems(gd); i++) {
  3735.         gs = GDgetEntry(gd, i);
  3736.   
  3737.         if (len >1 && strcmp(text+1, GSgetPath(gs)+1) == 0) {
  3738. -            if (WasCtrlZ) 
  3739. -             text[strlen(text)-2] = '.';
  3740.              Debug("Matched\n",0);
  3741.              return(i);
  3742.         }
  3743.        }
  3744. -      if (WasCtrlZ) 
  3745. -       text[strlen(text)-2] = '.';
  3746.        Debug("GDsearch: No Match\n",0);
  3747.        return(-1);
  3748.   }
  3749. --- 481,495 ----
  3750. diff -c gopher+/object/GSgopherobj.c:3.20 gopher+/object/GSgopherobj.c:3.27
  3751. *** gopher+/object/GSgopherobj.c:3.20    Fri Nov  5 01:50:16 1993
  3752. --- gopher+/object/GSgopherobj.c    Fri Nov  5 01:50:16 1993
  3753. ***************
  3754. *** 220,225 ****
  3755. --- 220,226 ----
  3756.        STRinit(gs->Localfile);
  3757.        STRinit(gs->Localview);
  3758.   
  3759. +      gs->ttl = -1;
  3760.        gs->iPort = 0;
  3761.        GSsetNum(gs, 0);
  3762.        GSsetWeight(gs, 0);
  3763. ***************
  3764. *** 279,284 ****
  3765. --- 280,296 ----
  3766.        return(URLget(gs->url));
  3767.   }
  3768.   
  3769. + char *
  3770. + GSgetURLhtml(gs)
  3771. +   GopherObj *gs;
  3772. + {
  3773. +      if (gs->url == NULL) {
  3774. +       gs->url = URLnew();
  3775. +       URLfromGS(gs->url, gs);
  3776. +      }
  3777. +      URLmakeHTML(gs->url);
  3778. +      return(URLget(gs->url));
  3779. + }
  3780.   
  3781.   void
  3782.   GSsetstringAsk(gs,ask)
  3783. ***************
  3784. *** 436,444 ****
  3785.    */
  3786.   
  3787.   void
  3788. ! GStoNet(gs, sockfd)
  3789.     GopherObj *gs;
  3790. !   int sockfd;
  3791.   {
  3792.        static char buf[1024];
  3793.   
  3794. --- 448,457 ----
  3795.    */
  3796.   
  3797.   void
  3798. ! GStoNet(gs, sockfd, fmt)
  3799.     GopherObj *gs;
  3800. !   int       sockfd;
  3801. !   GSformat  fmt;
  3802.   {
  3803.        static char buf[1024];
  3804.   
  3805. ***************
  3806. *** 447,469 ****
  3807.        if (buf[0] == '\0')    /* For example a .names with no Type */
  3808.       buf[0] = '3'; 
  3809.   
  3810. !      sprintf(buf + 1, "%s\t%s\t%s\t%d",
  3811. !          GSgetTitle(gs),
  3812. !          GSgetPath(gs),
  3813. !          GSgetHost(gs),
  3814. !          GSgetPort(gs));
  3815.   
  3816. !      if (GSisAsk(gs))
  3817. !       strcat(buf, "\t?\r\n");
  3818. !      else if (GSisGplus(gs))
  3819. !       strcat(buf, "\t+\r\n");
  3820. !      else
  3821. !       strcat(buf, "\r\n");
  3822. !      
  3823. !      writestring(sockfd, buf);
  3824. !      
  3825. !      Debug("GStoNet:%s", buf);
  3826.   }
  3827.   
  3828.   
  3829. --- 460,505 ----
  3830.        if (buf[0] == '\0')    /* For example a .names with no Type */
  3831.       buf[0] = '3'; 
  3832.   
  3833. !      if (fmt == GSFORM_G0) {
  3834. !       sprintf(buf + 1, "%s\t%s\t%s\t%d",
  3835. !           GSgetTitle(gs),
  3836. !           GSgetPath(gs),
  3837. !           GSgetHost(gs),
  3838. !           GSgetPort(gs));
  3839. !       
  3840. !       if (GSisAsk(gs))
  3841. !            strcat(buf, "\t?\r\n");
  3842. !       else if (GSisGplus(gs))
  3843. !            strcat(buf, "\t+\r\n");
  3844. !       else
  3845. !            strcat(buf, "\r\n");
  3846. !       
  3847. !       writestring(sockfd, buf);
  3848. !       Debug("GStoNet:%s", buf);
  3849. !      } 
  3850. !      else if (fmt == GSFORM_GPLUS) {
  3851. !       ;
  3852. !      }
  3853. !      else if (fmt == GSFORM_HTML) {
  3854. !       if (GSgetType(gs) == A_INFO) {
  3855. !            writestring(sockfd, "<DD>");
  3856. !            writestring(sockfd, GSgetTitle(gs));
  3857. !            return;
  3858. !       }
  3859. !       sprintf(buf, "<DT><A HREF=\"%s\">%s</A>\r\n",
  3860. !           GSgetURLhtml(gs),
  3861. !           GSgetTitle(gs));
  3862. !       writestring(sockfd, buf);
  3863.   
  3864. !       if (GSisGplus(gs)) {
  3865. !            ;
  3866. !       }
  3867. !       if (GSgetWeight(gs) != 0) {
  3868. !            sprintf(buf, "<DD>Score: %d\r\n", GSgetWeight(gs));
  3869. !            writestring(buf);
  3870. !       }
  3871. !      }
  3872. !       
  3873.   }
  3874.   
  3875.   
  3876. ***************
  3877. *** 500,506 ****
  3878.        
  3879.        /** Send out the old style INFO stuff **/
  3880.        writestring(sockfd, "+INFO: ");
  3881. !      GStoNet(gs,sockfd);
  3882.   
  3883.   
  3884.        /** Only write out "interesting" URLs **/
  3885. --- 536,542 ----
  3886.        
  3887.        /** Send out the old style INFO stuff **/
  3888.        writestring(sockfd, "+INFO: ");
  3889. !      GStoNet(gs,sockfd, GSFORM_G0);
  3890.   
  3891.   
  3892.        /** Only write out "interesting" URLs **/
  3893. ***************
  3894. *** 522,527 ****
  3895. --- 558,568 ----
  3896.              writestring(sockfd, GSgetAdmin(gs));
  3897.              writestring(sockfd, "\r\n Mod-Date: ");
  3898.              writestring(sockfd, GSgetModDate(gs));
  3899. +            if (GSgetTTL(gs) > -1) {
  3900. +             writestring(sockfd, "\r\n TTL: ");
  3901. +             sprintf(tmpstr, "%d", GSgetTTL(gs));
  3902. +             writestring(sockfd, tmpstr);
  3903. +            }
  3904.              writestring(sockfd, "\r\n");
  3905.         }
  3906.         if (GSgetNumViews(gs) > 0 && sendviews) {
  3907. ***************
  3908. *** 638,645 ****
  3909.                
  3910.                if (strncasecmp(cp, "Admin: ",7)==0)
  3911.                     GSsetAdmin(gs, cp+7);
  3912. !              if (strncasecmp(cp, "Mod-Date: ", 10)==0)
  3913.                     GSsetModDate(gs, cp+10);
  3914.               }
  3915.              } else if (strcasecmp(BLgetName(bl), "URL")==0) {
  3916.               char *cp;
  3917. --- 679,688 ----
  3918.                
  3919.                if (strncasecmp(cp, "Admin: ",7)==0)
  3920.                     GSsetAdmin(gs, cp+7);
  3921. !              else if (strncasecmp(cp, "Mod-Date: ", 10)==0)
  3922.                     GSsetModDate(gs, cp+10);
  3923. +              else if (strncasecmp(cp, "TTL: ", 5) == 0)
  3924. +                   GSsetTTL(gs, atoi(cp+5));
  3925.               }
  3926.              } else if (strcasecmp(BLgetName(bl), "URL")==0) {
  3927.               char *cp;
  3928. ***************
  3929. *** 796,801 ****
  3930. --- 839,846 ----
  3931.          case A_TN3270:
  3932.          case A_MIME:
  3933.          case A_IMAGE:
  3934. +        case A_INFO:
  3935. +        case A_MOVIE:
  3936.         break;
  3937.          case A_EOI:
  3938.         if (foo[1] == '\r' && foo[2] == '\n')
  3939. ***************
  3940. *** 860,865 ****
  3941. --- 905,912 ----
  3942.        GSsetGplus(dest, GSisGplus(orig));
  3943.        GSsetAsk(dest, GSisAsk(orig));
  3944.   
  3945. +      GSsetTTL(dest, GSgetTTL(orig));
  3946.        GSsetLocalFile(dest, GSgetLocalFile(orig));
  3947.        GSsetLocalView(dest, GSgetLocalView(orig));
  3948.        GSpluscpy(dest, orig);
  3949. ***************
  3950. *** 1194,1199 ****
  3951. --- 1241,1248 ----
  3952.        char buf[1024];
  3953.        int bytesread;
  3954.        boolean BadDomain = FALSE;   /** For use with the Domain= line **/
  3955. +      boolean DidDomain = FALSE;   /** Needed to make Domain= lines
  3956. +                       into logical or's **/
  3957.   
  3958.        Debug("GSfromLink...\n",0);
  3959.        while ((bytesread = readline(fd, buf, sizeof(buf)))>0) {
  3960. ***************
  3961. *** 1214,1219 ****
  3962. --- 1263,1270 ----
  3963.              GSsetType(gs, buf[5]);
  3964.              if (buf[6] == '+')
  3965.               GSsetGplus(gs, TRUE);
  3966. +            if (buf[6] == '?')
  3967. +             GSsetAsk(gs, TRUE);
  3968.              doneflags |= G_TYPE;
  3969.         }
  3970.   
  3971. ***************
  3972. *** 1269,1275 ****
  3973.              /** Check to see if the peer matches the domain **/
  3974.              int peerlen   = strlen(peer);
  3975.              int domainlen = strlen(buf+7);
  3976. !            
  3977.              if (domainlen > peerlen) {
  3978.               BadDomain = TRUE;
  3979.              } else if (strncasecmp(buf+7, peer + peerlen - domainlen, domainlen)== 0) {
  3980. --- 1320,1329 ----
  3981.              /** Check to see if the peer matches the domain **/
  3982.              int peerlen   = strlen(peer);
  3983.              int domainlen = strlen(buf+7);
  3984. !            if (DidDomain == TRUE && BadDomain == FALSE)
  3985. !             break;
  3986.              if (domainlen > peerlen) {
  3987.               BadDomain = TRUE;
  3988.              } else if (strncasecmp(buf+7, peer + peerlen - domainlen, domainlen)== 0) {
  3989. ***************
  3990. *** 1277,1284 ****
  3991. --- 1331,1356 ----
  3992.               BadDomain = FALSE;
  3993.              } else
  3994.               BadDomain = TRUE;
  3995. +            
  3996. +            DidDomain = TRUE;
  3997.         }
  3998. +       else if (strncmp(buf, "Domain_pat=", 11) ==0 && peer != NULL) {
  3999. +            if (DidDomain == TRUE && BadDomain == FALSE)
  4000. +             break;
  4001.   
  4002. +            /** Check for domain using regexps **/
  4003. +            if (re_comp(buf+11) != NULL)
  4004. +             break;
  4005. +            if (re_exec(peer) == 1)
  4006. +             BadDomain = FALSE;
  4007. +            else
  4008. +             BadDomain = TRUE;
  4009. +            DidDomain = TRUE;
  4010. +       }
  4011. +       else if (strncmp(buf, "TTL=", 4) == 0) {
  4012. +            GSsetTTL(gs, atoi(buf+4));
  4013. +       }
  4014.         else
  4015.              break;  /*** Unknown name/item ***/
  4016.        }
  4017. ***************
  4018. *** 1329,1335 ****
  4019.        sprintf(portnum, "%d", GSgetPort(gs));
  4020.        writestring(fd, portnum);
  4021.        writestring(fd, "\n");
  4022. !      if (GSisGplus(gs) && GSgplusInited(gs)) {
  4023.         writestring(fd, "Admin=");
  4024.         writestring(fd, GSgetAdmin(gs));
  4025.         writestring(fd, "\nModDate=");
  4026. --- 1401,1407 ----
  4027.        sprintf(portnum, "%d", GSgetPort(gs));
  4028.        writestring(fd, portnum);
  4029.        writestring(fd, "\n");
  4030. ! /*     if (GSisGplus(gs) && GSgplusInited(gs)) {
  4031.         writestring(fd, "Admin=");
  4032.         writestring(fd, GSgetAdmin(gs));
  4033.         writestring(fd, "\nModDate=");
  4034. ***************
  4035. *** 1336,1341 ****
  4036. --- 1408,1414 ----
  4037.         writestring(fd, GSgetModDate(gs));
  4038.         writestring(fd, "\n");
  4039.        }
  4040. + */
  4041.   }
  4042.   
  4043.   
  4044. ***************
  4045. *** 1345,1350 ****
  4046. --- 1418,1426 ----
  4047.     char *view;
  4048.   {
  4049.        char viewstowage[64], *cp;
  4050. +      if (view == NULL)
  4051. +       return(FALSE);
  4052.   
  4053.        strcpy(viewstowage, view);
  4054.        if ((cp=strchr(viewstowage, ' '))!=NULL) {
  4055. diff -c gopher+/object/GSgopherobj.h:3.9 gopher+/object/GSgopherobj.h:3.11
  4056. *** gopher+/object/GSgopherobj.h:3.9    Fri Nov  5 01:50:17 1993
  4057. --- gopher+/object/GSgopherobj.h    Fri Nov  5 01:50:17 1993
  4058. ***************
  4059. *** 1,7 ****
  4060.   /********************************************************************
  4061.    * lindner
  4062. !  * 3.9
  4063. !  * 1993/09/18 04:44:43
  4064.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/GSgopherobj.h,v
  4065.    * Exp
  4066.    *
  4067. --- 1,7 ----
  4068.   /********************************************************************
  4069.    * lindner
  4070. !  * 3.11
  4071. !  * 1993/11/02 06:15:27
  4072.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/GSgopherobj.h,v
  4073.    * Exp
  4074.    *
  4075. ***************
  4076. *** 15,20 ****
  4077. --- 15,26 ----
  4078.    *********************************************************************
  4079.    * Revision History:
  4080.    * GSgopherobj.h,v
  4081. +  * Revision 3.11  1993/11/02  06:15:27  lindner
  4082. +  * HTML additions
  4083. +  *
  4084. +  * Revision 3.10  1993/10/22  20:03:32  lindner
  4085. +  * Add Movie (;) and Info (i) type support
  4086. +  *
  4087.    * Revision 3.9  1993/09/18  04:44:43  lindner
  4088.    * Additions to fix caching of Multiple view items
  4089.    *
  4090. ***************
  4091. *** 81,91 ****
  4092. --- 87,106 ----
  4093.   #define A_TN3270    'T'
  4094.   #define A_MIME      'M'
  4095.   #define A_IMAGE     'I'
  4096. + #define A_INFO      'i'
  4097. + #define A_MOVIE     ';'
  4098.   #define A_EOI        '.'
  4099.   
  4100.   typedef struct g_struct GopherObj;
  4101.   #include "BLblock.h"
  4102.   
  4103. + /*** Formats for GStoNet() ***/
  4104. + #define GSFORM_G0    0
  4105. + #define GSFORM_GPLUS 1
  4106. + #define GSFORM_HTML  2
  4107. + typedef int GSformat;
  4108.   /*** Our gopher+ attributes structure ***/
  4109.   
  4110.   struct gplus_struct
  4111. ***************
  4112. *** 118,123 ****
  4113. --- 133,139 ----
  4114.        int     iPort;         /* Port number on host                    */
  4115.        int     Itemnum;       /* The number of the item in the directory*/
  4116.        int     weight;        /* The weight, expressed as a # from 0-1000 */
  4117. +      int     ttl;           /* The Time-To-Live, how long the item is good */
  4118.   
  4119.        String  *Localfile;    /* The local file of the item */
  4120.        String  *Localview;    /* The view of the local file of the item */
  4121. ***************
  4122. *** 125,131 ****
  4123.        boolean isgplus;       /* Item can be queried gopher+ style */
  4124.        boolean isask;         /* Item contains an ASK block */
  4125.        GplusObj *gplus;       /* Gopher + attributes */
  4126. !      Url      *url;
  4127.   };
  4128.   
  4129.   
  4130. --- 141,147 ----
  4131.        boolean isgplus;       /* Item can be queried gopher+ style */
  4132.        boolean isask;         /* Item contains an ASK block */
  4133.        GplusObj *gplus;       /* Gopher + attributes */
  4134. !      Url      *url;         /* The Unix^H^H^Hniversal Resource Locator */
  4135.   };
  4136.   
  4137.   
  4138. ***************
  4139. *** 152,157 ****
  4140. --- 168,176 ----
  4141.   #define GSgetWeight(a)   ((a)->weight)
  4142.   #define GSsetWeight(a,b) ((a)->weight=(b))
  4143.   
  4144. + #define GSgetTTL(a)   ((a)->ttl)
  4145. + #define GSsetTTL(a,b) ((a)->ttl=(b))
  4146.   #define GSgetLocalFile(a) ((STRget((a)->Localfile)))
  4147.   #define GSsetLocalFile(a,b) ((STRset((a)->Localfile, (b))))
  4148.   
  4149. ***************
  4150. *** 172,184 ****
  4151.   #define GSgetModDate(a)  (STRget((a)->gplus->ModDate)) 
  4152.   
  4153.   /* some compilers can't grok this... */
  4154. - /*#define GSgetVIA(a) (((a)->gplus == NULL) ? NULL : ((a)->gplus->Views))*/
  4155.   #define GSgetNumViews(a) (VIAgetTop((a)->gplus->Views))
  4156.   #define GSgetView(a,b)   (VIAgetEntry((a)->gplus->Views,(b)))
  4157.   
  4158.   /* Some of the code has been known to do a->gplus->OtherBlocks
  4159.      when gplus is NULL, leads to obscure errors :-) 
  4160. -    
  4161.      Of course lots of compilers can't grok this...  sigh... */
  4162.   #define GSgetOtherBlocks(a) (((a)->gplus->OtherBlocks))
  4163.   
  4164. --- 191,201 ----
  4165. diff -c gopher+/object/Regex.h:3.1 gopher+/object/Regex.h:3.2
  4166. *** gopher+/object/Regex.h:3.1    Fri Nov  5 01:50:18 1993
  4167. --- gopher+/object/Regex.h    Fri Nov  5 01:50:18 1993
  4168. ***************
  4169. *** 1,7 ****
  4170.   /********************************************************************
  4171.    * lindner
  4172. !  * 3.1
  4173. !  * 1993/10/19 20:48:26
  4174.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/Regex.h,v
  4175.    * $Status: $
  4176.    *
  4177. --- 1,7 ----
  4178.   /********************************************************************
  4179.    * lindner
  4180. !  * 3.2
  4181. !  * 1993/10/27 18:50:38
  4182.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/Regex.h,v
  4183.    * $Status: $
  4184.    *
  4185. ***************
  4186. *** 15,20 ****
  4187. --- 15,23 ----
  4188.    *********************************************************************
  4189.    * Revision History:
  4190.    * Regex.h,v
  4191. +  * Revision 3.2  1993/10/27  18:50:38  lindner
  4192. +  * Support for more sysv platforms
  4193. +  *
  4194.    * Revision 3.1  1993/10/19  20:48:26  lindner
  4195.    * Portable versions of Regular expression routines for System V and BSD..
  4196.    *
  4197. ***************
  4198. *** 22,28 ****
  4199.    *********************************************************************/
  4200.   
  4201.   
  4202. ! #if defined(USG) || defined(__svr4__) || defined(_AUX_SOURCE)
  4203.   
  4204.   #  include "Malloc.h"  /** For NULL **/
  4205.   
  4206. --- 25,31 ----
  4207.    *********************************************************************/
  4208.   
  4209.   
  4210. ! #if defined(USG) || defined(__svr4__) || defined(_AUX_SOURCE) || defined(hpux) || defined(irix) || defined(SYSVREGEX)
  4211.   
  4212.   #  include "Malloc.h"  /** For NULL **/
  4213.   
  4214. diff -c gopher+/object/STRstring.c:3.4 gopher+/object/STRstring.c:3.6
  4215. *** gopher+/object/STRstring.c:3.4    Fri Nov  5 01:50:18 1993
  4216. --- gopher+/object/STRstring.c    Fri Nov  5 01:50:18 1993
  4217. ***************
  4218. *** 1,7 ****
  4219.   /********************************************************************
  4220.    * lindner
  4221. !  * 3.4
  4222. !  * 1993/10/19 20:46:00
  4223.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/STRstring.c,v
  4224.    * $Status: $
  4225.    *
  4226. --- 1,7 ----
  4227.   /********************************************************************
  4228.    * lindner
  4229. !  * 3.6
  4230. !  * 1993/10/27 18:53:23
  4231.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/STRstring.c,v
  4232.    * $Status: $
  4233.    *
  4234. ***************
  4235. *** 15,20 ****
  4236. --- 15,26 ----
  4237.    *********************************************************************
  4238.    * Revision History:
  4239.    * STRstring.c,v
  4240. +  * Revision 3.6  1993/10/27  18:53:23  lindner
  4241. +  * don't forget \0
  4242. +  *
  4243. +  * Revision 3.5  1993/10/22  20:15:52  lindner
  4244. +  * Remove superfulous declaration of len (Fote)
  4245. +  *
  4246.    * Revision 3.4  1993/10/19  20:46:00  lindner
  4247.    * Better, tighter STRstring stuff (Fote)
  4248.    *
  4249. ***************
  4250. *** 47,53 ****
  4251.     char *in;
  4252.   {
  4253.        register String *temp;
  4254. -      register int len;
  4255.   
  4256.        temp = (String *) malloc(sizeof(String));
  4257.        temp->data = NULL;
  4258. --- 53,58 ----
  4259. ***************
  4260. *** 55,62 ****
  4261.        if (in == NULL)
  4262.         return(temp);
  4263.   
  4264. -      len = strlen(in) + 1;
  4265.        STRset(temp, in);
  4266.        return(temp);
  4267.   }
  4268. --- 60,65 ----
  4269. ***************
  4270. *** 133,150 ****
  4271.        if (*str == '\0')
  4272.         len = 1;
  4273.        else
  4274. !       len = strlen(str);
  4275.   
  4276.        /* Uninitialized data... */
  4277.   
  4278.        if (st->data == NULL) {
  4279. !       st->data = (char *) malloc(sizeof(char*) * len+1);
  4280.         st->len = len;
  4281.        }
  4282.   
  4283.        /** Something's already there... **/
  4284.   
  4285. !      else if (STRlen(st) < len) {
  4286.         char *temp;
  4287.   
  4288.         temp = (char *) realloc(st->data, len);
  4289. --- 136,153 ----
  4290.        if (*str == '\0')
  4291.         len = 1;
  4292.        else
  4293. !       len = strlen(str)+1; /** Don't forget the '\0' **/
  4294.   
  4295.        /* Uninitialized data... */
  4296.   
  4297.        if (st->data == NULL) {
  4298. !       st->data = (char *) malloc(sizeof(char*) * len);
  4299.         st->len = len;
  4300.        }
  4301.   
  4302.        /** Something's already there... **/
  4303.   
  4304. !      else if (STRsize(st) < len) {
  4305.         char *temp;
  4306.   
  4307.         temp = (char *) realloc(st->data, len);
  4308. diff -c gopher+/object/STRstring.h:3.2 gopher+/object/STRstring.h:3.3
  4309. *** gopher+/object/STRstring.h:3.2    Fri Nov  5 01:50:19 1993
  4310. --- gopher+/object/STRstring.h    Fri Nov  5 01:50:19 1993
  4311. ***************
  4312. *** 1,7 ****
  4313.   /********************************************************************
  4314.    * lindner
  4315. !  * 3.2
  4316. !  * 1993/06/22 05:48:03
  4317.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/STRstring.h,v
  4318.    * Exp
  4319.    *
  4320. --- 1,7 ----
  4321.   /********************************************************************
  4322.    * lindner
  4323. !  * 3.3
  4324. !  * 1993/10/27 18:53:44
  4325.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/STRstring.h,v
  4326.    * Exp
  4327.    *
  4328. ***************
  4329. *** 15,20 ****
  4330. --- 15,23 ----
  4331.    *********************************************************************
  4332.    * Revision History:
  4333.    * STRstring.h,v
  4334. +  * Revision 3.3  1993/10/27  18:53:44  lindner
  4335. +  * Add STRsize()
  4336. +  *
  4337.    * Revision 3.2  1993/06/22  05:48:03  lindner
  4338.    * Mods for VMS
  4339.    *
  4340. ***************
  4341. *** 54,61 ****
  4342.   void    STRinit(/* String*  */);
  4343.   void    STRset(/* String*, char* */);
  4344.   void    STRdestroy(/* String* */);
  4345. ! #define STRget(s) ((s)->data)
  4346. ! #define STRlen(s) ((s)->len)
  4347.   String* STRcat();
  4348.   int     STRcmp();
  4349.   
  4350. --- 57,65 ----
  4351.   void    STRinit(/* String*  */);
  4352.   void    STRset(/* String*, char* */);
  4353.   void    STRdestroy(/* String* */);
  4354. ! #define STRget(s)  ((s)->data)
  4355. ! #define STRlen(s)  ((s)->len)
  4356. ! #define STRsize(s) ((s)->len)
  4357.   String* STRcat();
  4358.   int     STRcmp();
  4359.   
  4360. diff -c gopher+/object/Wait.h:3.3 gopher+/object/Wait.h:3.4
  4361. *** gopher+/object/Wait.h:3.3    Fri Nov  5 01:50:19 1993
  4362. --- gopher+/object/Wait.h    Fri Nov  5 01:50:19 1993
  4363. ***************
  4364. *** 1,7 ****
  4365.   /********************************************************************
  4366.    * lindner
  4367. !  * 3.3
  4368. !  * 1993/07/20 23:19:41
  4369.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/Wait.h,v
  4370.    * $Status: $
  4371.    *
  4372. --- 1,7 ----
  4373.   /********************************************************************
  4374.    * lindner
  4375. !  * 3.4
  4376. !  * 1993/11/02 06:16:58
  4377.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/Wait.h,v
  4378.    * $Status: $
  4379.    *
  4380. ***************
  4381. *** 15,20 ****
  4382. --- 15,23 ----
  4383.    *********************************************************************
  4384.    * Revision History:
  4385.    * Wait.h,v
  4386. +  * Revision 3.4  1993/11/02  06:16:58  lindner
  4387. +  * Fix for epix
  4388. +  *
  4389.    * Revision 3.3  1993/07/20  23:19:41  lindner
  4390.    * Use waitpid, not wait3
  4391.    *
  4392. ***************
  4393. *** 41,47 ****
  4394.   
  4395.   /** These don't know what waitpid() is..  Naughty! **/
  4396.   
  4397. ! #if defined(NeXT)
  4398.       typedef union wait Portawait;
  4399.   #   define waitpid(a,b,c) wait3(b,c,NULL)
  4400.   
  4401. --- 44,50 ----
  4402.   
  4403.   /** These don't know what waitpid() is..  Naughty! **/
  4404.   
  4405. ! #if defined(NeXT) || defined(SYSTYPE_BSD43) || defined(NO_WAITPID)
  4406.       typedef union wait Portawait;
  4407.   #   define waitpid(a,b,c) wait3(b,c,NULL)
  4408.   
  4409. diff -c gopher+/object/compatible.c:3.6 gopher+/object/compatible.c:3.7
  4410. *** gopher+/object/compatible.c:3.6    Fri Nov  5 01:50:19 1993
  4411. --- gopher+/object/compatible.c    Fri Nov  5 01:50:20 1993
  4412. ***************
  4413. *** 1,7 ****
  4414.   /********************************************************************
  4415.    * lindner
  4416. !  * 3.6
  4417. !  * 1993/09/03 03:26:39
  4418.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/compatible.c,v
  4419.    * Exp
  4420.    *
  4421. --- 1,7 ----
  4422.   /********************************************************************
  4423.    * lindner
  4424. !  * 3.7
  4425. !  * 1993/10/27 18:51:10
  4426.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/compatible.c,v
  4427.    * Exp
  4428.    *
  4429. ***************
  4430. *** 15,20 ****
  4431. --- 15,23 ----
  4432.    *********************************************************************
  4433.    * Revision History:
  4434.    * compatible.c,v
  4435. +  * Revision 3.7  1993/10/27  18:51:10  lindner
  4436. +  * Updates for VMS files/records
  4437. +  *
  4438.    * Revision 3.6  1993/09/03  03:26:39  lindner
  4439.    * Better VMS tempnam() implementation
  4440.    *
  4441. ***************
  4442. *** 106,116 ****
  4443.     char *dir;
  4444.     char *pfx;
  4445.   {
  4446. - #ifndef VMS
  4447.       char space[512];
  4448.       char *newspace;
  4449.   
  4450.       if (dir == NULL) {
  4451.           dir = "/usr/tmp";
  4452.       } else if (*dir == '\0') {
  4453.           dir = "/usr/tmp";
  4454. --- 109,133 ----
  4455.     char *dir;
  4456.     char *pfx;
  4457.   {
  4458.       char space[512];
  4459.       char *newspace;
  4460.   
  4461. + #ifdef VMS
  4462.       if (dir == NULL) {
  4463. +         dir = "sys$scratch:";
  4464. +     } else if (*dir == '\0') {
  4465. +         dir = "sys$scratch:";
  4466. +     }
  4467. +     
  4468. +     if (pfx == NULL) {
  4469. +         pfx = "gopher.$";
  4470. +     } else if (*pfx == '\0') {
  4471. +         pfx = "gopher.$";
  4472. +     }
  4473. +     sprintf(space, "%s%s%d%d", dir, pfx, getpid(), cnt);
  4474. + #else
  4475. +     if (dir == NULL) {
  4476.           dir = "/usr/tmp";
  4477.       } else if (*dir == '\0') {
  4478.           dir = "/usr/tmp";
  4479. ***************
  4480. *** 121,126 ****
  4481. --- 138,144 ----
  4482.       }
  4483.   
  4484.       sprintf(space, "%s/%s%d.%d", dir, pfx, getpid(), cnt);
  4485. + #endif
  4486.       cnt++;
  4487.       
  4488.       newspace = (char *)malloc(strlen(space) + 1);
  4489. ***************
  4490. *** 128,151 ****
  4491.           strcpy(newspace, space);
  4492.       }
  4493.       return newspace;
  4494. - #else
  4495. -     char *tmpname, *cp;
  4496. -     register int len;
  4497. -         char tmpfilename[L_tmpnam];
  4498. -         (void) tmpnam(tmpfilename);
  4499. -         if (dir != NULL) {
  4500. -          while ((cp=strrchr(dir, ' ')) != 0)
  4501. -               *cp = '\0';
  4502. -     }
  4503. -     len = (dir == NULL) ? 12 : strlen(dir) +
  4504. -           (pfx == NULL) ?  8 : strlen(pfx) + strlen(tmpfilename);
  4505. -     tmpname = (char *) malloc(sizeof(char)*len+1);
  4506. -     sprintf(tmpname, "%s%s%s",
  4507. -              (dir == NULL) ? "sys$scratch:" : dir,
  4508. -              (pfx == NULL) ? "gopher.$" : pfx, tmpfilename);
  4509. -         return(tmpname);
  4510. - #endif
  4511.   }
  4512.   #endif
  4513.   
  4514. --- 146,151 ----
  4515. ***************
  4516. *** 315,320 ****
  4517. --- 315,332 ----
  4518.   #undef open
  4519.   #endif
  4520.   
  4521. + FILE *fopen_VAR ( name, mode )
  4522. +     char *name, *mode;
  4523. + {
  4524. +     return fopen ( name, mode, "rfm=var","rat=cr","mbc=32" );
  4525. + }
  4526. + FILE *fopen_FIX ( name, mode )
  4527. +     char *name, *mode;
  4528. + {
  4529. +     return fopen ( name, mode, "rfm=fix","mrs=512","mbc=32" );
  4530. + }
  4531.   FILE *fopen_VMSopt ( name, mode )
  4532.       char *name, *mode;
  4533.   {
  4534. ***************
  4535. *** 328,333 ****
  4536. --- 340,346 ----
  4537.   {
  4538.       return  open ( name, flags, mode, "mbc=32");
  4539.   }
  4540.   #endif
  4541.   
  4542.   
  4543. diff -c gopher+/object/compatible.h:3.12 gopher+/object/compatible.h:3.14
  4544. *** gopher+/object/compatible.h:3.12    Fri Nov  5 01:50:20 1993
  4545. --- gopher+/object/compatible.h    Fri Nov  5 01:50:20 1993
  4546. ***************
  4547. *** 1,7 ****
  4548.   /********************************************************************
  4549.    * lindner
  4550. !  * 3.12
  4551. !  * 1993/09/28 19:23:56
  4552.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/compatible.h,v
  4553.    * Exp
  4554.    *
  4555. --- 1,7 ----
  4556.   /********************************************************************
  4557.    * lindner
  4558. !  * 3.14
  4559. !  * 1993/11/05 07:24:15
  4560.    * /export/mudhoney/GopherSrc/CVS/gopher+/object/compatible.h,v
  4561.    * Exp
  4562.    *
  4563. ***************
  4564. *** 15,20 ****
  4565. --- 15,26 ----
  4566.    *********************************************************************
  4567.    * Revision History:
  4568.    * compatible.h,v
  4569. +  * Revision 3.14  1993/11/05  07:24:15  lindner
  4570. +  * Fixes for NeXTs
  4571. +  *
  4572. +  * Revision 3.13  1993/10/27  18:51:12  lindner
  4573. +  * Updates for VMS files/records
  4574. +  *
  4575.    * Revision 3.12  1993/09/28  19:23:56  lindner
  4576.    * update for VMS getwd()
  4577.    *
  4578. ***************
  4579. *** 196,201 ****
  4580. --- 202,210 ----
  4581.   #    define closenet close
  4582.   #  endif
  4583.   
  4584. +    FILE *fopen_VAR();
  4585. +    FILE *fopen_FIX();
  4586.   #else
  4587.      /* non-VMS systems don't need a special netclose either */
  4588.   #  define closenet close
  4589. ***************
  4590. *** 215,221 ****
  4591.   #ifdef NeXT
  4592.   
  4593.   typedef int pid_t;
  4594.   #endif
  4595.   
  4596.   /********* Systems that can't set proctitles *******/
  4597. --- 224,230 ----
  4598.   #ifdef NeXT
  4599.   
  4600.   typedef int pid_t;
  4601. ! #define ANSI_LIKE  /** freeWAIS bastards! **/
  4602.   #endif
  4603.   
  4604.   /********* Systems that can't set proctitles *******/
  4605. ***************
  4606. *** 223,225 ****
  4607. --- 232,237 ----
  4608.   #   undef SETPROCTITLE
  4609.   #endif
  4610.   
  4611. + #if defined(NeXT) || defined(NO_NEWSTATDOTH)
  4612. + #define S_IXUSR S_IEXEC
  4613. + #endif
  4614. diff -c gopher+/object/url.c:3.2 gopher+/object/url.c:3.3
  4615. *** gopher+/object/url.c:3.2    Fri Nov  5 01:50:21 1993
  4616. --- gopher+/object/url.c    Fri Nov  5 01:50:21 1993
  4617. ***************
  4618. *** 1,3 ****
  4619. --- 1,26 ----
  4620. + /********************************************************************
  4621. +  * lindner
  4622. +  * 3.3
  4623. +  * 1993/11/02 06:14:09
  4624. +  * /export/mudhoney/GopherSrc/CVS/gopher+/object/url.c,v
  4625. +  * Exp
  4626. +  *
  4627. +  * Paul Lindner, University of Minnesota CIS.
  4628. +  *
  4629. +  * Copyright 1991, 1992 by the Regents of the University of Minnesota
  4630. +  * see the file "Copyright" in the distribution for conditions of use.
  4631. +  *********************************************************************
  4632. +  * MODULE: url.c
  4633. +  * Simplified method of getting urls..
  4634. +  *********************************************************************
  4635. +  * Revision History:
  4636. +  * url.c,v
  4637. +  * Revision 3.3  1993/11/02  06:14:09  lindner
  4638. +  * Add url html hack
  4639. +  *
  4640. +  *
  4641. +  *********************************************************************/
  4642.   #include "url.h"
  4643.   #include "GSgopherobj.h"
  4644.   #include "Malloc.h"
  4645. ***************
  4646. *** 74,79 ****
  4647. --- 97,144 ----
  4648.   
  4649.        URLset(url, u);
  4650.   }
  4651. + /*
  4652. +  * Hack gopher directories into an HTML type...
  4653. +  */
  4654. + void
  4655. + URLmakeHTML(url)
  4656. +   Url *url;
  4657. + {
  4658. +      char *cp = URLget(url);
  4659. +      char *host;
  4660. +      if (cp == NULL) 
  4661. +       return;
  4662. +      if (strncmp(cp, "gopher://", 9) != 0)
  4663. +       return;
  4664. +      /** find the type character **/
  4665. +      cp = strchr(cp+10, '/');
  4666. +      
  4667. +      if (cp ==NULL)
  4668. +       return;
  4669. +      host = cp+10;
  4670. +      
  4671. +      /** Test link for current host **/
  4672. + /*     if (strcasecmp(host, hostname) != 0) 
  4673. +       return;*/
  4674. +      
  4675. +      cp ++;
  4676. +      /** cp is now pointed at the type character **/
  4677. +      
  4678. +      if (*cp == '1' && *(cp+1) == '1') {
  4679. +       /** It's a directory **/
  4680. +       *cp = 'h';
  4681. +       *(cp+1) = 'h';
  4682. +      }
  4683. + }
  4684.   
  4685.   /*
  4686.    * Get the transport of the specified URL
  4687. diff -c gopher+/object/url.h:3.1 gopher+/object/url.h:3.2
  4688. *** gopher+/object/url.h:3.1    Fri Nov  5 01:50:21 1993
  4689. --- gopher+/object/url.h    Fri Nov  5 01:50:21 1993
  4690. ***************
  4691. *** 1,6 ****
  4692. ! /*
  4693.    *
  4694. !  */
  4695.   
  4696.   #ifndef URL_H
  4697.   #define URL_H
  4698. --- 1,25 ----
  4699. ! /********************************************************************
  4700. !  * lindner
  4701. !  * 3.2
  4702. !  * 1993/11/02 06:14:11
  4703. !  * /export/mudhoney/GopherSrc/CVS/gopher+/object/url.h,v
  4704. !  * Exp
  4705.    *
  4706. !  * Paul Lindner, University of Minnesota CIS.
  4707. !  *
  4708. !  * Copyright 1991, 1992 by the Regents of the University of Minnesota
  4709. !  * see the file "Copyright" in the distribution for conditions of use.
  4710. !  *********************************************************************
  4711. !  * MODULE: url.h
  4712. !  * Simplified method of getting urls..
  4713. !  *********************************************************************
  4714. !  * Revision History:
  4715. !  * url.h,v
  4716. !  * Revision 3.2  1993/11/02  06:14:11  lindner
  4717. !  * Add url html hack
  4718. !  *
  4719. !  *
  4720. !  *********************************************************************/
  4721.   
  4722.   #ifndef URL_H
  4723.   #define URL_H
  4724. ***************
  4725. *** 19,28 ****
  4726.   Url  *URLnew();
  4727.   void URLdestroy();
  4728.   void URLfromGS();
  4729.   char *URLgetTransport();
  4730.   char *URLgetHost();
  4731.   char *URLgetPort();
  4732.   
  4733.   #endif /* URL_H */
  4734. --- 38,46 ----
  4735.   Url  *URLnew();
  4736.   void URLdestroy();
  4737.   void URLfromGS();
  4738. + void URLmakeHTML();
  4739.   char *URLgetTransport();
  4740.   char *URLgetHost();
  4741.   char *URLgetPort();
  4742.   
  4743.   #endif /* URL_H */
  4744. diff -c /dev/null gopher+/test/Makefile:1.1
  4745. *** /dev/null    Fri Nov  5 01:50:22 1993
  4746. --- gopher+/test/Makefile    Fri Nov  5 01:50:22 1993
  4747. ***************
  4748. *** 0 ****
  4749. --- 1,39 ----
  4750. + include ../Makefile.config
  4751. + GFILT = ../gophfilt/gophfilt -h localhost -s 9999 -p 
  4752. + test-nonroot:
  4753. +     @echo "Building test.conf file"
  4754. +     @-rm -f test.conf
  4755. +     @cat <test.raw >test.conf
  4756. +     @echo "auxconf: /auxconf `pwd`/otheradmin.conf" >>test.conf
  4757. +     @echo "Starting test gopher server on port 9999"
  4758. +     ../gopherd/gopherd -C -o test.conf -c `pwd`/data 9999
  4759. +     @sleep 5
  4760. +     -@rm -f ./results/root ./results/root-long \
  4761. +         ./results/links ./results/links-long
  4762. +     $(GFILT) "" -t 1         >./results/root
  4763. +     $(GFILT) "" -i '$$' -t 1 >./results/root-long
  4764. +     $(GFILT) "" -i '!' -t 1  >./results/root-info
  4765. +     $(GFILT) "1/links" -t 1         >./results/links
  4766. +     $(GFILT) "1/links" -i '$$' -t 1 >./results/links-long
  4767. +     $(GFILT) "1/links" -i '!' -t 1  >./results/links-info
  4768. +     
  4769. +     $(GFILT) "1/auxconf" -t 1         >./results/aux
  4770. +     $(GFILT) "1/auxconf" -i '$$' -t 1 >./results/aux-long
  4771. +     $(GFILT) "1/auxconf" -i '!' -t 1  >./results/aux-info
  4772. +     $(GFILT) "1/views" -t 1         >./results/views
  4773. +     $(GFILT) "1/views" -i '$$' -t 1 >./results/views-long
  4774. +     $(GFILT) "1/views" -i '!' -t 1  >./results/views-info
  4775. +     $(GFILT) "0/views/t-shirt" -t 0  >./results/views-txt
  4776. +     $(GFILT) "0/decode-n-scripts/C-Programming" -t 0  >./results/views-txt
  4777. +     
  4778. + all: test-nonroot
  4779. +     
  4780. diff -c /dev/null gopher+/test/otheradmin.conf:1.1
  4781. *** /dev/null    Fri Nov  5 01:50:22 1993
  4782. --- gopher+/test/otheradmin.conf    Fri Nov  5 01:50:22 1993
  4783. ***************
  4784. *** 0 ****
  4785. --- 1,2 ----
  4786. + Admin: Another Administrator
  4787. + AdminEmail: fred@localhost
  4788. diff -c /dev/null gopher+/test/test.raw:1.1
  4789. *** /dev/null    Fri Nov  5 01:50:22 1993
  4790. --- gopher+/test/test.raw    Fri Nov  5 01:50:22 1993
  4791. ***************
  4792. *** 0 ****
  4793. --- 1,225 ----
  4794. + #
  4795. + # test.raw,v 1.1 1993/11/04 01:51:59 lindner Exp
  4796. + #
  4797. + #
  4798. + # An example gopherd.conf file
  4799. + #
  4800. + #
  4801. + # Hostalias line,
  4802. + #
  4803. + #  format is:
  4804. + #
  4805. + #  "hostalias: <hostname alias>"
  4806. + hostalias: localhost
  4807. + #
  4808. + # Cachetime line
  4809. + #
  4810. + # Format is "cachetime: <time in seconds>"
  4811. + #
  4812. + Cachetime: 0
  4813. + #
  4814. + # Administrator line,
  4815. + #
  4816. + # format is:
  4817. + # "Admin:" <any text thing, usually a name/phone fax,etc>
  4818. + #
  4819. + # "AdminEmail:" <RFC-822 Email address>
  4820. + Admin: Test Administrator
  4821. + AdminEmail: gopher@localhost
  4822. + #
  4823. + # Site
  4824. + #
  4825. + #Site: the name of the site
  4826. + #Org: organization or group owning the site
  4827. + #Loc: city, state, country
  4828. + #Geog: latitude longitude
  4829. + #Language: default language of items on the server
  4830. + #TZ: timezone as gmt-offset
  4831. + Site: Gopher Testing Labs
  4832. + Org: Gopher International Ltd.
  4833. + Loc: Minneapolis, MN, USA
  4834. + Geog: 44 58 48 N 93 15 49 W
  4835. + Language: En_US
  4836. + decoder: .Z /usr/ucb/zcat
  4837. + decoder: .z /usr/gnu/bin/zcat
  4838. + decoder: .gz /usr/gnu/bin/zcat
  4839. + decoder: .adpcm /usr/openwin/bin/adpcm_dec
  4840. + #TZ: -6
  4841. + #
  4842. + # Map filename extensions to gopher-types
  4843. + #
  4844. + # Format is 
  4845. + # "viewext: <extension> <gophertype> <pfx> <gopher+type> [ISO langauge]
  4846. + #
  4847. + # Different Languages
  4848. + #
  4849. + # The following will probably be text/plain soon
  4850. + #
  4851. + viewext: .txt.spanish 0 0 Text/plain Es_ES
  4852. + viewext: .txt.german 0 0 Text/plain De_DE
  4853. + viewext: .txt.french 0 0 Text/plain Fr_FR
  4854. + viewext: .hqx 4 0 application/mac-binhex40
  4855. + viewext: .moo 8 0 terminal/moo
  4856. + #
  4857. + # Telnet file formats
  4858. + #
  4859. + viewext: .telnet 8 0 terminal/telnet
  4860. + viewext: .tn3270 T 0 terminal/tn3270
  4861. + #
  4862. + # Graphics file formats
  4863. + #
  4864. + viewext: .gif I 9 image/gif
  4865. + viewext: .jpg I 9 image/JPEG
  4866. + #
  4867. + # These are not IANA approved
  4868. + #
  4869. + viewext: .tiff I 9 image/TIFF
  4870. + viewext: .pcx I 9 image/pcx
  4871. + viewext: .pict I 9 image/PICT
  4872. + viewext: .ppm I 9 image/ppm
  4873. + viewext: .pgm I 9 image/pgm
  4874. + viewext: .pbm I 9 image/pgm
  4875. + #
  4876. + # Sounds
  4877. + #
  4878. + viewext: .au s s audio/basic
  4879. + viewext: .snd s s audio/basic
  4880. + viewext: .wav s s audio/microsoft-wave
  4881. + #
  4882. + # Movies
  4883. + #
  4884. + viewext: .mov ; 9 video/quicktime
  4885. + viewext: .mpg ; 9 video/mpeg
  4886. + #
  4887. + # Binary files, these need changing for the encoding method
  4888. + # plus they'll probably become application/octet-stream
  4889. + # or some such nonsense...
  4890. + #
  4891. + viewext: .zip 5 9 application/zip
  4892. + viewext: .arj 5 9 application/x-arj
  4893. + viewext: .tar.Z 9 9 file/tar.Z
  4894. + viewext: .tar 9 9 file/tar
  4895. + viewext: .zoo 5 9 file/Zoo
  4896. + viewext: .arc 5 9 file/Arc
  4897. + viewext: .lzh 5 9 file/Lharc
  4898. + viewext: .lha 5 9 file/Lharc-amiga-disk
  4899. + viewext: .dms 5 9 file/Diskmasher
  4900. + viewext: .exe 5 9 file/PCEXE
  4901. + viewext: .bck 9 9 file/vmsbackup
  4902. + viewext: .sav 9 9 file/vmssave
  4903. + viewext: .ps 0 0 application/postscript
  4904. + viewext: .tex 0 0 Text/x-tex
  4905. + viewext: .dvi 0 9 Text/x-dvi
  4906. + viewext: .troff 0 0 Text/x-troff
  4907. + #
  4908. + # These are defined by IANA..
  4909. + #
  4910. + viewext: .rtf 0 0 application/rtf
  4911. + viewext: .word 0 0 application/MSWord
  4912. + viewext: .mw 0 0 application/MacWriteII
  4913. + viewext: .wp 0 0 application/dca-rft
  4914. + viewext: .rch 0 0 Text/richtext
  4915. + viewext: .wri 9 9 application/Microsoft-write
  4916. + #
  4917. + # This most certainly isn't :-)  ..... yet
  4918. + #
  4919. + viewext: .smell 9 9 smell/funky
  4920. + #
  4921. + #
  4922. + viewext: .mindex 7 mindex: application/gopher-menu
  4923. + viewext: .src 7 waissrc: Directory
  4924. + viewext: .html h 0 text/html
  4925. + #
  4926. + # These are for the experimental gview
  4927. + #
  4928. + viewext: .gview 1 1 Directory+/gview
  4929. + blockext: .spot GVIEWSPOT
  4930. + #
  4931. + # Map files to certain blocks
  4932. + # 
  4933. + blockext: .abstract ABSTRACT
  4934. + blockext: .ask ASK
  4935. + #
  4936. + # Find out what a file is by looking at the contents
  4937. + # (Not implemented yet...)
  4938. + #
  4939. + #magic 0 GIF 9 I Gif
  4940. + #magic 0 snd s s audio/basic
  4941. + #
  4942. + # Note that mail spool files are still done by the server
  4943. + #
  4944. + #
  4945. + # Trash we never want to see (Note that it checks from the end)
  4946. + # so you can ignore anything with a certain extension.
  4947. + # (like emacs backup files)
  4948. + #
  4949. + ignore: lost+found
  4950. + ignore: lib
  4951. + ignore: bin
  4952. + ignore: etc
  4953. + ignore: dev
  4954. + ignore: ~
  4955. + ignore: .cache
  4956. + ignore: .cache+
  4957. + ignore: CVS
  4958. + #
  4959. + # ignore_patt uses regular expressions to ignore files.  See the man page
  4960. + # for ed(1)
  4961. + #
  4962. + ignore_patt: ^core$
  4963. + ignore_patt: ^usr$
  4964. + ignore_patt: ^tmp$
  4965. + #
  4966. + # BummerMsg is a message that is displayed when there isn't proper
  4967. + # access..
  4968. + #
  4969. + BummerMsg: Sorry Dude, we don't allow off-site access to this server
  4970. + #
  4971. + #  Note that the default "default" entry is free access
  4972. + #  Also note that the values you put for an entry modify the "default" values
  4973. + # 
  4974. + #access: default         !browse,!read,search
  4975. + #access: default     !ftp
  4976. + #
  4977. + # The secureusers: specifies a ticket file to use for ADMIT1 authentication
  4978. + #
  4979. + #secureusers: /usr/local/etc/gopherusers
  4980. diff -c /dev/null gopher+/test/data/.names:1.1
  4981. *** /dev/null    Fri Nov  5 01:50:23 1993
  4982. --- gopher+/test/data/.names    Fri Nov  5 01:50:23 1993
  4983. ***************
  4984. *** 0 ****
  4985. --- 1,8 ----
  4986. + Path=./links
  4987. + Name=Dot Link file tests..
  4988. + #
  4989. + Path=./auxconf
  4990. + Name=Alternate Configuration File tests
  4991. + #
  4992. + Path=./ftp-horrors
  4993. + Name=Hall of FTP Horrors
  4994. diff -c /dev/null gopher+/test/data/About:1.1
  4995. *** /dev/null    Fri Nov  5 01:50:23 1993
  4996. --- gopher+/test/data/About    Fri Nov  5 01:50:23 1993
  4997. ***************
  4998. *** 0 ****
  4999. --- 1,3 ----
  5000. + This is a test Gopher Server...  It is meant to illustrate and test
  5001. + the various features of the Unix Gopher Server.
  5002. diff -c /dev/null gopher+/test/data/decode-n-scripts/shell-script:1.1
  5003. *** /dev/null    Fri Nov  5 01:50:25 1993
  5004. --- gopher+/test/data/decode-n-scripts/shell-script    Fri Nov  5 01:50:26 1993
  5005. ***************
  5006. *** 0 ****
  5007. --- 1,4 ----
  5008. + #!/bin/sh
  5009. + echo "This is a test of a shell script"
  5010. + echo "You could put all sorts of cool stuff here"
  5011. diff -c /dev/null gopher+/test/data/decode-n-scripts/shell-script.abstract:1.1
  5012. *** /dev/null    Fri Nov  5 01:50:26 1993
  5013. --- gopher+/test/data/decode-n-scripts/shell-script.abstract    Fri Nov  5 01:50:26 1993
  5014. ***************
  5015. *** 0 ****
  5016. --- 1,5 ----
  5017. + This is an example of a shell script.  All you need to do to execute a shell
  5018. + script is put it on the server.  Fairly simple really..
  5019. + To get a different type for your script you can use the extension processing
  5020. + capabilities of gopherd.conf or use a .names file.
  5021. diff -c /dev/null gopher+/test/data/decode-n-scripts/shell-script.tar:1.1
  5022. *** /dev/null    Fri Nov  5 01:50:26 1993
  5023. --- gopher+/test/data/decode-n-scripts/shell-script.tar    Fri Nov  5 01:50:26 1993
  5024. ***************
  5025. *** 0 ****
  5026. --- 1,2 ----
  5027. + #!/bin/sh
  5028. + tar cf - .
  5029. diff -c /dev/null gopher+/test/data/ftp-horrors/.Links:1.1
  5030. *** /dev/null    Fri Nov  5 01:50:27 1993
  5031. --- gopher+/test/data/ftp-horrors/.Links    Fri Nov  5 01:50:27 1993
  5032. ***************
  5033. *** 0 ****
  5034. --- 1,23 ----
  5035. + Name=Boombox
  5036. + Type=1
  5037. + Path=ftp:boombox.micro.umn.edu@/pub/
  5038. + Host=+
  5039. + Port=+
  5040. + #
  5041. + Name=Multinet VMS
  5042. + Type=1
  5043. + Path=ftp:vx.cis.umn.edu@/
  5044. + Host=+
  5045. + Port=+
  5046. + #
  5047. + Name=Macintosh FTP Server
  5048. + Type=1
  5049. + Path=ftp:ftp.asante.com@/
  5050. + Host=+
  5051. + Port=+
  5052. + #
  5053. + Name=Novell FTP Server
  5054. + Type=1
  5055. + Path=ftp:novell.macc.wisc.edu@/
  5056. + Host=+
  5057. + Port=+
  5058. diff -c /dev/null gopher+/test/data/links/.Links:1.1
  5059. *** /dev/null    Fri Nov  5 01:50:27 1993
  5060. --- gopher+/test/data/links/.Links    Fri Nov  5 01:50:27 1993
  5061. ***************
  5062. *** 0 ****
  5063. --- 1,28 ----
  5064. + Type=8
  5065. + Name=UofMN Lumina System (telnet) #100
  5066. + Host=pubinfo.ais.umn.edu
  5067. + Port=23
  5068. + Numb=100
  5069. + Path=
  5070. + #
  5071. + Type=T
  5072. + Name=UofMN Lumina System (tn3270) #200
  5073. + Host=pubinfo.ais.umn.edu
  5074. + Port=23
  5075. + Numb=200
  5076. + Path=
  5077. + #
  5078. + Path=
  5079. + Type=2
  5080. + Name=Phone Book at the UofMN
  5081. + Host=x500.tc.umn.edu
  5082. + Port=105
  5083. + Abstract=Search for phone numbers at the University of Minnesota
  5084. + #
  5085. + Name=List of All Gopher Servers
  5086. + Type=1
  5087. + Host=gopher.tc.umn.edu
  5088. + Port=70
  5089. + Path=1/Other Gopher and Information Servers
  5090. + Abstract=List of all gopher servers from the University of Minnesota #-10
  5091. + Numb=-10
  5092. diff -c /dev/null gopher+/test/data/views/t-shirt:1.1
  5093. *** /dev/null    Fri Nov  5 01:50:28 1993
  5094. --- gopher+/test/data/views/t-shirt    Fri Nov  5 01:50:28 1993
  5095. ***************
  5096. *** 0 ****
  5097. --- 1,30 ----
  5098. + $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  5099. + $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  5100. + $$$$$$$$$$$$$$$$$""$$"$$$$$ $$$$$$$$$$$$$$$$$$$$$
  5101. + $$$$$$$$$$""   "" o " """" o  "$$$$$$$$$$$$$$$$$$
  5102. + $$$$$$$$$" $$o$$$ o oooooo$   $"$$$$$$$$$$$$$$$$$
  5103. + $$$$$$$o  $$"   "" o         o         " "$$$$$$$
  5104. + $$$$$$$"  $oo$"    $    $"   $o   oo$"  oo$$$$$$$
  5105. + $$$$$$$$   "$""o$ ""  o "    "    o"""  "$$$$$$$$
  5106. + $$$$$$$$$ o ooo$$$oooo o oooo"" $$ o o o o$$$$$$$
  5107. + $$$$$$$$$$$$$"" "$$$$o o"   """$  $ """$$ $ ""$$$
  5108. + $$$$$$$$"""  "o oo "" ""o " oo"o  $   o  $ ooo$$$
  5109. + $$$$$$$ o" "o"" ""ooo"  ""o""o"oo$$$$$$$$$ooo$$$$
  5110. + $$$$$$ oo"o$$$$$$o$o $"o" o $  o" $$$$$$$$$$$$$$$
  5111. + $$$$$$"oo " $$$"    $  o " o$ " $"o$$$$$$$$$$$$$$
  5112. + $$$$$$$$ o  $o"  " o$ o"o  " o $" $$$$$$$$$$$$$$$
  5113. + $$$$$$$$" o$ ""$o      o "$"$oo o $$$$$$$$$$$$$$$
  5114. + $$$$$$$$ $$$$$o ""$  "     $$      o$$$$$$$$$$$$$
  5115. + $$$$$$$o $$$$$$o   "   " ""  o  o  $$$$"$$$$$$$$$
  5116. + $$$$$$$$ $$$$$$$$o        o""      " $"o"$$$$$$$$
  5117. + $$$$$$$$$ $$$$$$$o       o"   "   o""  $o $$$$$$$
  5118. + $$$$$$$$$$o""$$$$$  o"  o"     "oo        $$$$$$$
  5119. + $$$$$$$$$$$oo  "$$$$" $  "o  $"""o"   " $$$$$$$$$
  5120. + $$$$$$$$$$$$$$oo$""$o o ""oo  o ""ooo   $"o$$$$$$
  5121. + $$$$$$$$$$$$$$$$$$o o o$" o"o$$        " oo$$$$$$
  5122. + $$$$$$$$$$$$$$$$$$" o$$oo$$$$""o$$ "$o$"$$$$$$$$$
  5123. + $$$$$$$$$$$$$$$$ooo$$$$$$$$o$o$$" o"ooo$$$$$$$$$$
  5124. + $$$$$$$$$$$$$$$$$$""$$$$$$$$$"$$  $$$$$$$$$$$$$$$
  5125. + $$$$$$$$$$$$$$$$$$$"  o"""$""ooo$$$$$$$$$$$$$$$$$
  5126. + $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  5127. + $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  5128. diff -c /dev/null gopher+/test/data/views/t-shirt.abstract:1.1
  5129. *** /dev/null    Fri Nov  5 01:50:28 1993
  5130. --- gopher+/test/data/views/t-shirt.abstract    Fri Nov  5 01:50:29 1993
  5131. ***************
  5132. *** 0 ****
  5133. --- 1,3 ----
  5134. + This is a really low-res picture of the Internet Gopher World
  5135. + Tour T-Shirt.
  5136. diff -c /dev/null gopher+/test/good-results/aux:1.1
  5137. *** /dev/null    Fri Nov  5 01:50:30 1993
  5138. --- gopher+/test/good-results/aux    Fri Nov  5 01:50:30 1993
  5139. ***************
  5140. *** 0 ****
  5141. --- 1 ----
  5142. + 0testfile    0/auxconf/testfile    localhost    9999    +
  5143. diff -c /dev/null gopher+/test/good-results/aux-info:1.1
  5144. *** /dev/null    Fri Nov  5 01:50:30 1993
  5145. --- gopher+/test/good-results/aux-info    Fri Nov  5 01:50:31 1993
  5146. ***************
  5147. *** 0 ****
  5148. --- 1,10 ----
  5149. + +-1
  5150. + +INFO: 1Alternate Configuration File tests    1/auxconf    localhost    9999    +
  5151. + +ADMIN:
  5152. +  Admin: Another Administrator <fred@localhost>
  5153. +  Mod-Date: Tue Oct 26 19:19:25 1993 <19931026191925>
  5154. +  TTL: 0
  5155. + +VIEWS:
  5156. +  application/gopher-menu En_US: <.5k>
  5157. +  application/gopher+-menu En_US: <.5k>
  5158. +  text/html En_US: <.5k>
  5159. diff -c /dev/null gopher+/test/good-results/aux-long:1.1
  5160. *** /dev/null    Fri Nov  5 01:50:31 1993
  5161. --- gopher+/test/good-results/aux-long    Fri Nov  5 01:50:31 1993
  5162. ***************
  5163. *** 0 ****
  5164. --- 1,7 ----
  5165. + +-1
  5166. + +INFO: 0testfile    0/auxconf/testfile    localhost    9999    +
  5167. + +ADMIN:
  5168. +  Admin: Another Administrator <fred@localhost>
  5169. +  Mod-Date: Tue Oct 26 19:19:25 1993 <19931026191925>
  5170. + +VIEWS:
  5171. +  Text/plain En_US: <.0k>
  5172. diff -c /dev/null gopher+/test/good-results/links:1.1
  5173. *** /dev/null    Fri Nov  5 01:50:31 1993
  5174. --- gopher+/test/good-results/links    Fri Nov  5 01:50:31 1993
  5175. ***************
  5176. *** 0 ****
  5177. --- 1,4 ----
  5178. + 8UofMN Lumina System (telnet) #100        pubinfo.ais.umn.edu    23
  5179. + TUofMN Lumina System (tn3270) #200        pubinfo.ais.umn.edu    23
  5180. + 2Phone Book at the UofMN        x500.tc.umn.edu    105
  5181. + 1List of All Gopher Servers    1/Other Gopher and Information Servers    gopher.tc.umn.edu    70
  5182. diff -c /dev/null gopher+/test/good-results/links-info:1.1
  5183. *** /dev/null    Fri Nov  5 01:50:31 1993
  5184. --- gopher+/test/good-results/links-info    Fri Nov  5 01:50:31 1993
  5185. ***************
  5186. *** 0 ****
  5187. --- 1,10 ----
  5188. + +-1
  5189. + +INFO: 1Dot Link file tests..    1/links    localhost    9999    +
  5190. + +ADMIN:
  5191. +  Admin: Test Administrator <gopher@localhost>
  5192. +  Mod-Date: Tue Oct 26 18:44:48 1993 <19931026184448>
  5193. +  TTL: 0
  5194. + +VIEWS:
  5195. +  application/gopher-menu En_US: <.5k>
  5196. +  application/gopher+-menu En_US: <.5k>
  5197. +  text/html En_US: <.5k>
  5198. diff -c /dev/null gopher+/test/good-results/links-long:1.1
  5199. *** /dev/null    Fri Nov  5 01:50:31 1993
  5200. --- gopher+/test/good-results/links-long    Fri Nov  5 01:50:31 1993
  5201. ***************
  5202. *** 0 ****
  5203. --- 1,9 ----
  5204. + +-1
  5205. + +INFO: 8UofMN Lumina System (telnet) #100        pubinfo.ais.umn.edu    23
  5206. + +INFO: TUofMN Lumina System (tn3270) #200        pubinfo.ais.umn.edu    23
  5207. + +INFO: 2Phone Book at the UofMN        x500.tc.umn.edu    105
  5208. + +ABSTRACT:
  5209. +  Search for phone numbers at the University of Minnesota
  5210. + +INFO: 1List of All Gopher Servers    1/Other Gopher and Information Servers    gopher.tc.umn.edu    70
  5211. + +ABSTRACT:
  5212. +  List of all gopher servers from the University of Minnesota #-10
  5213. diff -c /dev/null gopher+/test/good-results/root:1.1
  5214. *** /dev/null    Fri Nov  5 01:50:32 1993
  5215. --- gopher+/test/good-results/root    Fri Nov  5 01:50:32 1993
  5216. ***************
  5217. *** 0 ****
  5218. --- 1,6 ----
  5219. + 0About    0/About    localhost    9999    +
  5220. + 1Alternate Configuration File tests    1/auxconf    localhost    9999    +
  5221. + 1Dot Link file tests..    1/links    localhost    9999    +
  5222. + 1Hall of FTP Horrors    1/ftp-horrors    localhost    9999    +
  5223. + 1decode-n-scripts    1/decode-n-scripts    localhost    9999    +
  5224. + 1views    1/views    localhost    9999    +
  5225. diff -c /dev/null gopher+/test/good-results/root-info:1.1
  5226. *** /dev/null    Fri Nov  5 01:50:32 1993
  5227. --- gopher+/test/good-results/root-info    Fri Nov  5 01:50:32 1993
  5228. ***************
  5229. *** 0 ****
  5230. --- 1,16 ----
  5231. + +-1
  5232. + +INFO 1Gopher Testing Labs        localhost    9999    +
  5233. + +ADMIN:
  5234. +  Admin: Test Administrator <gopher@localhost>
  5235. +  Site: Gopher Testing Labs
  5236. +  Org: Gopher International Ltd.
  5237. +  Loc: Minneapolis, MN, USA
  5238. +  Geog: 44 58 48 N 93 15 49 W
  5239. +  Version: U of Minnesota Unix 2.0 pl10
  5240. + +VERONICA:
  5241. +  treewalk: yes
  5242. + +VIEWS:
  5243. +  application/gopher-menu: <0k>
  5244. +  application/gopher+-menu: <0k>
  5245. +  Directory/recursive: <0k>
  5246. +  Directory+/recursive: <0k>
  5247. diff -c /dev/null gopher+/test/good-results/root-long:1.1
  5248. *** /dev/null    Fri Nov  5 01:50:32 1993
  5249. --- gopher+/test/good-results/root-long    Fri Nov  5 01:50:32 1993
  5250. ***************
  5251. *** 0 ****
  5252. --- 1,52 ----
  5253. + +-1
  5254. + +INFO: 0About    0/About    localhost    9999    +
  5255. + +ADMIN:
  5256. +  Admin: Test Administrator <gopher@localhost>
  5257. +  Mod-Date: Wed Oct 27 15:20:10 1993 <19931027152010>
  5258. + +VIEWS:
  5259. +  Text/plain En_US: <.1k>
  5260. + +INFO: 1Alternate Configuration File tests    1/auxconf    localhost    9999    +
  5261. + +ADMIN:
  5262. +  Admin: Test Administrator <gopher@localhost>
  5263. +  Mod-Date: Tue Oct 26 19:19:25 1993 <19931026191925>
  5264. +  TTL: 0
  5265. + +VIEWS:
  5266. +  application/gopher-menu En_US: <.5k>
  5267. +  application/gopher+-menu En_US: <.5k>
  5268. +  text/html En_US: <.5k>
  5269. + +INFO: 1Dot Link file tests..    1/links    localhost    9999    +
  5270. + +ADMIN:
  5271. +  Admin: Test Administrator <gopher@localhost>
  5272. +  Mod-Date: Tue Oct 26 18:44:48 1993 <19931026184448>
  5273. +  TTL: 0
  5274. + +VIEWS:
  5275. +  application/gopher-menu En_US: <.5k>
  5276. +  application/gopher+-menu En_US: <.5k>
  5277. +  text/html En_US: <.5k>
  5278. + +INFO: 1Hall of FTP Horrors    1/ftp-horrors    localhost    9999    +
  5279. + +ADMIN:
  5280. +  Admin: Test Administrator <gopher@localhost>
  5281. +  Mod-Date: Tue Nov  2 13:33:27 1993 <19931102133327>
  5282. +  TTL: 0
  5283. + +VIEWS:
  5284. +  application/gopher-menu En_US: <.5k>
  5285. +  application/gopher+-menu En_US: <.5k>
  5286. +  text/html En_US: <.5k>
  5287. + +INFO: 1decode-n-scripts    1/decode-n-scripts    localhost    9999    +
  5288. + +ADMIN:
  5289. +  Admin: Test Administrator <gopher@localhost>
  5290. +  Mod-Date: Thu Oct 28 17:01:07 1993 <19931028170107>
  5291. +  TTL: 0
  5292. + +VIEWS:
  5293. +  application/gopher-menu En_US: <.5k>
  5294. +  application/gopher+-menu En_US: <.5k>
  5295. +  text/html En_US: <.5k>
  5296. + +INFO: 1views    1/views    localhost    9999    +
  5297. + +ADMIN:
  5298. +  Admin: Test Administrator <gopher@localhost>
  5299. +  Mod-Date: Wed Oct 27 15:32:37 1993 <19931027153237>
  5300. +  TTL: 0
  5301. + +VIEWS:
  5302. +  application/gopher-menu En_US: <.5k>
  5303. +  application/gopher+-menu En_US: <.5k>
  5304. +  text/html En_US: <.5k>
  5305. diff -c /dev/null gopher+/test/good-results/views:1.1
  5306. *** /dev/null    Fri Nov  5 01:50:32 1993
  5307. --- gopher+/test/good-results/views    Fri Nov  5 01:50:32 1993
  5308. ***************
  5309. *** 0 ****
  5310. --- 1 ----
  5311. + 0t-shirt    0/views/t-shirt    localhost    9999    +
  5312. diff -c /dev/null gopher+/test/good-results/views-info:1.1
  5313. *** /dev/null    Fri Nov  5 01:50:33 1993
  5314. --- gopher+/test/good-results/views-info    Fri Nov  5 01:50:33 1993
  5315. ***************
  5316. *** 0 ****
  5317. --- 1,10 ----
  5318. + +-1
  5319. + +INFO: 1views    1/views    localhost    9999    +
  5320. + +ADMIN:
  5321. +  Admin: Test Administrator <gopher@localhost>
  5322. +  Mod-Date: Wed Oct 27 15:32:37 1993 <19931027153237>
  5323. +  TTL: 0
  5324. + +VIEWS:
  5325. +  application/gopher-menu En_US: <.5k>
  5326. +  application/gopher+-menu En_US: <.5k>
  5327. +  text/html En_US: <.5k>
  5328. diff -c /dev/null gopher+/test/good-results/views-long:1.1
  5329. *** /dev/null    Fri Nov  5 01:50:33 1993
  5330. --- gopher+/test/good-results/views-long    Fri Nov  5 01:50:33 1993
  5331. ***************
  5332. *** 0 ****
  5333. --- 1,12 ----
  5334. + +-1
  5335. + +INFO: 0t-shirt    0/views/t-shirt    localhost    9999    +
  5336. + +ADMIN:
  5337. +  Admin: Test Administrator <gopher@localhost>
  5338. +  Mod-Date: Wed Oct 27 15:23:12 1993 <19931027152312>
  5339. + +VIEWS:
  5340. +  Text/plain En_US: <1k>
  5341. +  image/gif En_US: <.8k>
  5342. + +ABSTRACT:
  5343. +  This is a really low-res picture of the Internet Gopher World
  5344. +  Tour T-Shirt.
  5345. +  
  5346. diff -c /dev/null gopher+/test/good-results/views-txt:1.1
  5347. *** /dev/null    Fri Nov  5 01:50:33 1993
  5348. --- gopher+/test/good-results/views-txt    Fri Nov  5 01:50:33 1993
  5349. ***************
  5350. *** 0 ****
  5351. --- 1,26 ----
  5352. +                         How to program in "C"
  5353. +                         ---------------------
  5354. + 1] Use lots of global variables.
  5355. + 2] Give them cryptic names such as: X27, a_gcl, or Horace.
  5356. + 3] Put everything in one large .h file.
  5357. + 4] Implement the entire project at once.
  5358. + 5] Use macros and #defines to emulate Pascal.
  5359. + 6] Assume the compiler takes care of all the little details you didn't
  5360. +    quite understand.
  5361. + "It's 5:50 a.m., Do you know where your stack pointer is?"
  5362. +                         How to debug a "C" program.
  5363. +                         ---------------------------
  5364. + 1] If at all possible, don't, let someone else do it.
  5365. + 2] Change majors.
  5366. + 3] Insert/remove blank lines at random spots, re-compile, and excecute.
  5367. + 4] Throw holy water on the terminal.
  5368. + 5] Dial 911 and scream.
  5369. + 6] There is rumour that "printf" is usefull, but this is probably
  5370. +    unfounded. 
  5371. + 7] Port everything to CP/M.
  5372. + 8] If it still doesn't work, re-write it in assembler.  This won't fix
  5373. +    the bug, but it will make sure no one else finds it and makes you
  5374. +    look bad. 
  5375.